Skip to content
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

[libobjc2] method_setImplementation does not work on resolved metaclasses #1639

Open
DHowett-MSFT opened this issue Jan 5, 2017 · 1 comment

Comments

@DHowett-MSFT
Copy link

DHowett-MSFT commented Jan 5, 2017

When you use method_setImplementation(Method, IMP) on a method retrieved from a metaclass (lit.: a class method), and that metaclass is fully resolved, its dtable will not be updated to point to the new IMP.

This is due to a bug in objc_updateDtableForClassContainingMethod. It iterates over every class known to the runtime and updates the dtable of the first class containing that selector (!!).

@DHowett-MSFT DHowett-MSFT changed the title [libobjc2] method_replaceImplementation does not work on resolved metaclasses [libobjc2] method_setImplementation does not work on resolved metaclasses Jan 5, 2017
@rajsesh rajsesh modified the milestones: 1701, 1704 Jan 5, 2017
@rajsesh rajsesh modified the milestones: Backlog, 1704 Feb 21, 2017
@DHowett-MSFT
Copy link
Author

Tracked in gnustep/libobjc2#32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants