-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Foundation fixes for 32-bit systems and more #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @tienex |
@@ -1202,7 +1202,7 @@ CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType type, const vo | |||
} | |||
} | |||
|
|||
CFIndex size = 8 + ((!__CFNumberTypeTable[type].floatBit && __CFNumberTypeTable[type].storageBit) ? 8 : 0); | |||
CFIndex size = (sizeof(struct __CFNumber) - sizeof(CFRuntimeBase)) + ((!__CFNumberTypeTable[type].floatBit && __CFNumberTypeTable[type].storageBit) ? 8 : 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, this seems to work just fine on 32 bit linked processes; I will have to do some digging to verify that...
The change listed here actually looks more correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Linux/arm the alignment is different, the _pad is found at 24, while CFRuntimeBase is 20 bytes long leading to an awful heap overflow.
@phausler I'm just checking up on a few pending PRs that I have... Is there anything on this one that you need me to fix? (sorry to be a pest) |
everything checks out |
Foundation fixes for 32-bit systems and more
Thanks! |
Prettify hover response
This is a collection of fixes that address some edge cases relating to 32-bit systems, differing alignments, uninitialized locales, and incomplete paths.