-
Notifications
You must be signed in to change notification settings - Fork 70
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
Fix TSAN data races #74
Conversation
Thanks @sherry-yuan for addressing thread safety! I am not quite sure I understand the issue yet. The context |
Thanks for noticing it! I realized this is not the cause after testing it again (probably things started working after multiple change and lead me into thinking all of them together fix the issue). Updated the newest version to not change test order. |
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.
Thanks @sherry-yuan. How about moving the CMake support into a separate commit? This can be benefitial, e.g., when cherry-picking individual commits later, say for a release branch.
------------------------------------------------------ As found in intel#71, tsan reported several issues in the acl_test Currently when release command queue are called (which frees the memory) subsequent still checks the values at the same address which cause tsan to report heap-use-after-free.
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.
Thanks @sherry-yuan! For the changes in create_with_properties
, how can the issues be reproduced? TSAN seems to pass fine with GCC 7.4.0, are these flagged by ASAN instead?
As found in #71, tsan reported several issues in the acl_test
Currently when release command queue are called (which frees the memory) subsequent still checks the values at the same address which cause tsan to report heap-use-after-free.
The test after_context_release are moved upward to be the first test because ctest execute the test in reverse order of how they appear in the cpp file. Given after_context_release will release the command queue, they should be run last, i.e place at the top in the test.cpp file.
Prerequisit for #63
Closes #71