-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Make ASWeakMapEntry Value Atomic #555
Conversation
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.
LGTM
Source/Private/ASWeakMap.m
Outdated
@@ -19,6 +19,7 @@ | |||
|
|||
@interface ASWeakMapEntry () | |||
@property (nonatomic, strong) NSObject *key; |
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.
May worth making key
read-only.
I went a little overboard and also changed the |
CHANGELOG.md
Outdated
@@ -16,6 +16,7 @@ | |||
- Table and collection views to consider content inset when calculating (default) element size range [Huy Nguyen](https://github.com/nguyenhuy) [#525](https://github.com/TextureGroup/Texture/pull/525) | |||
- [ASEditableTextNode] added -editableTextNodeShouldBeginEditing to ASEditableTextNodeDelegate to mirror the corresponding method from UITextViewDelegate. [Yan S.](https://github.com/yans) [#535](https://github.com/TextureGroup/Texture/pull/535) | |||
- [Breaking] Remove APIs that have been deprecated since 2.0 and/or for at least 6 months [Huy Nguyen](https://github.com/nguyenhuy) [#529](https://github.com/TextureGroup/Texture/pull/529) | |||
- Fixed a memory corruption issue in the ASImageNode display system. [Adlai Holler](https://github.com/Adlai-Holler) [#55](https://github.com/TextureGroup/Texture/pull/555) |
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.
Nit: "#555"
* Make ASWeakMapEntry value atomic * Increment changelog * Go a little nuts * Update CHANGELOG.md
We are seeing a variety of memory corruption crashes around the image values in the ASImageNode display pipeline.
It could be unrelated, but there exists a race on the
value
property of ASWeakMapEntry which is implementednonatomic
but is read/written from different threads.