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

Possible race crash in multi-dispatch around the weak mutable set implementation. #65

Closed
numist opened this issue Feb 25, 2014 · 1 comment
Assignees
Milestone

Comments

@numist
Copy link
Owner

numist commented Feb 25, 2014

Technically an NNKit bug but it's only been discovered here and it needs to get fixed before 0.0.8. Looks like there's a potential race causing a crash in objc_retain when a service dispatches a message using multidispatch and the subscribers/observers are recently dead.

@numist numist added this to the 0.0.8 (β) milestone Feb 25, 2014
@numist numist self-assigned this Feb 25, 2014
numist added a commit that referenced this issue Feb 26, 2014
@numist
Copy link
Owner Author

numist commented Feb 26, 2014

Turns out NSHashTable is what I wanted the whole time. NNKit no longer provides nor uses its own internal mutable weak set implementation. The actual change is numist/NNKit@1670a68

For the curious, the tombstone objects in the weak set had a nonatomic weak property referencing the weak member of the collection and that property needed to be atomic to avoid losing races where the object would dealloc between the property getter and the retain/autorelease. Sigh.

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

1 participant