Repository navigation
[asan] Use standard POSIX code for AsanTSD (thread-specific data) han… - #15095
Merged
Merged
Conversation
…dling As well use being less code to maintain and more shared code this also enables thread exit handling which means ASan now tracks thread exit where it didn't before. With the old/existing code noone was ever calling the ASan thread destructor (passed as arg0 to AsanTSDInit). I imagine this approach might not have been possible in the past since there were some issues with using pthread_keys with destructors (e.g. #15086). Testing by running entire `asan` test suite.
sbc100
commented
Sep 22, 2021
|
|
||
| // There's no initialization needed, and the passed-in destructor | ||
| // will never be called. Instead, our own thread destruction hook | ||
| // (below) will call AsanThread::TSDDtor directly. |
Collaborator
Author
There was a problem hiding this comment.
This was a lie ... looks like was copied asan_fuchsia.cpp where AsanThread::TSDDtor is actually called.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…dling
As well use being less code to maintain and more shared code this also
enables thread exit handling which means ASan now tracks thread exit
where it didn't before. With the old/existing code noone was ever
calling the ASan thread destructor (passed as arg0 to AsanTSDInit).
I imagine this approach might not have been possible in the past since
there were some issues with using pthread_keys with destructors (e.g. #15086).
Testing by running entire
asantest suite.