-
Notifications
You must be signed in to change notification settings - Fork 119
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
NSZone Selector Missmatch #297
Comments
Hmm, this is a special case of a general problem that we should probably fix: If one compilation unit has a selector that takes a pointer to a forward-declared structure and another has one that takes a pointer to the same forward-declared structure but can see the definition, their types will not match. This is likely to be true for anything where structures are handed out as opaque types. The right solution here is probably to have the selector hashing code skip everything between the = and } in pointers to structures (not in structures passed by value. We should hash |
Good idea. Let's merge #298 first to avoid merge conflicts later on :) |
But we also need to take care of Line 329 in a9d0313
Apple just takes the address of the selector as hash, as all selectors are uniqued in That is not really an option for us as this requires a contract with the linker. So I guess doing it at runtime is the best option at the expense of a more complex selector hashing and equality routine. Are we ok with that? |
The
NSZone
stub here has in a different signature which results in a warning at runtime when passing a gnustep-base NSZone struct toobjc_allocWithZone
:(@24@0:8^{_NSZone=^?^?^?^?^?^?^?Q@^{_NSZone}}16), selector has @24@0:8^{_NSZone=}16
.@davidchisnall how about changing the NSZone struct in
fast_path.m
to follow the same layout as in gnustep-base?The text was updated successfully, but these errors were encountered: