Fix address sanitizer issue in new_worker (rx-newthread.hpp)#497
Merged
kirkshoop merged 1 commit intoReactiveX:masterfrom Apr 26, 2019
Merged
Fix address sanitizer issue in new_worker (rx-newthread.hpp)#497kirkshoop merged 1 commit intoReactiveX:masterfrom
kirkshoop merged 1 commit intoReactiveX:masterfrom
Conversation
Contributor
Author
|
Another possibility suggested by @lebdron is to create a separate variable for |
Member
|
Yes, I would like to have a copy of peek.when and keep peek a reference |
Signed-off-by: Konstantin Munichev <[email protected]>
c8741a5 to
07a06db
Compare
Contributor
Author
|
@kirkshoop okay, I did a change |
Member
|
Thank you! |
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.
Greetings!
Some time ago I performed checks of some project which uses RxCpp with address sanitizer and got this:
Logs are truncated a bit, please check https://gist.github.com/luckychess/0abced67530eda0ede1456e666d2ccf6 for details.
After some investigation the problem became more clear to me:
wait_until(line 113)wait_untilreleases the lockpush(line 136)And after that the reference becomes invalid according to ASAN, because of a data race in an underlying queue.
My propose is to retrieve a copy of a queue item instead of reference. It eliminates ASAN errors.
Also ASAN blames for this only under MacOS but finds no issues on Linux. Probably because of a different queue implementation.