Skip to content

Add TSAN annotations to pool_scalable #132

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

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Conversation

igchor
Copy link
Member

@igchor igchor commented Jan 11, 2024

To fix false positives from TSAN.

Found by @kswiecicki. Can you verify that this fixes the issue?

@igchor igchor requested a review from a team as a code owner January 11, 2024 17:27
@kswiecicki
Copy link
Contributor

To fix false positives from TSAN.

Found by @kswiecicki. Can you verify that this fixes the issue?

It does fix the issue in tbb_calloc. Wouldn't it be a good idea to also add those annotations in other tbb callbacks that acquire or release memory?

To fix false positives from TSAN.
@igchor
Copy link
Member Author

igchor commented Jan 12, 2024

To fix false positives from TSAN.
Found by @kswiecicki. Can you verify that this fixes the issue?

It does fix the issue in tbb_calloc. Wouldn't it be a good idea to also add those annotations in other tbb callbacks that acquire or release memory?

Good point, done. Note that I switched from calling acquire/release on 'ptr' to calling them on 'pool'. The reason is that it's possible for part of the allocation that is freed to be assigned to another thread. In that case, the 'ptr' will be different but the writes will still overlap.

@bratpiorka bratpiorka requested a review from ldorau January 15, 2024 16:01
@ldorau ldorau merged commit f47dcdb into oneapi-src:main Jan 16, 2024
@igchor igchor deleted the tsan_fixes branch January 16, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants