-
Notifications
You must be signed in to change notification settings - Fork 35
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
KVC can corrupt NSObjects isa & return garbage. #19
Comments
Update: this happens with struct like but not with { Probably KVC can get struct with property/method properly only if it's size > 4 bytes. |
Update: restoring isa can help avoid crashes after using valueForKey: BUT! |
Update: tested on iPad 2 with iOS 5.0.1 - works ok, bug doesn't exist. Updated first post. |
Update: tested on iPad 2 with iOS 4.3.5 - affected. |
Update: ccColor3B should be 4 bytes under 4.3 simulator to avoid KVC failure. |
When getting struct value with memory footprint not multiple of 4 ( i.e. ccColor3B - 3 bytes) with valueForKey: via property's/method name (not via ivar name) - isa pointer can be changed (sic!).
Looks like it happens on iOS 4.3
Affected:
Nonaffected:
The text was updated successfully, but these errors were encountered: