Skip to content

[DevTSAN] Cleanup private shadow memory when function exit #17735

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 2 commits into from
Apr 3, 2025

Conversation

zhaomaosu
Copy link
Contributor

We need to skip the check for private memory, otherwise OpenCL CPU device may generate false positive reports due to stack re-use in different threads. However, SPIR-V builts 'ToPrivate' doesn't work as expected on OpenCL CPU device. So we need to manually cleanup private shadow before each function exit point.

We need to skip the check for private memory, otherwise OpenCL CPU
device may generate false positive reports due to stack re-use in different
threads. However, SPIR-V builts 'ToPrivate' doesn't work as expected on
OpenCL CPU device. So we need to manually cleanup private shadow before
each function exit point.
@zhaomaosu zhaomaosu marked this pull request as ready for review April 1, 2025 01:42
@zhaomaosu zhaomaosu requested a review from a team as a code owner April 1, 2025 01:42
@zhaomaosu
Copy link
Contributor Author

@intel/llvm-gatekeepers, this PR is ready to be merged. Thanks.

@zhaomaosu zhaomaosu requested a review from a team April 1, 2025 10:19
@bader
Copy link
Contributor

bader commented Apr 3, 2025

@intel/llvm-gatekeepers, this PR is ready to be merged. Thanks.

@intel/llvm-gatekeepers, ping.

@uditagarwal97 uditagarwal97 merged commit 816a8da into intel:sycl Apr 3, 2025
23 checks passed
@zhaomaosu zhaomaosu deleted the tsan-cleanup-private-shadow branch April 3, 2025 05:35
ggojska pushed a commit to ggojska/llvm that referenced this pull request Apr 7, 2025
We need to skip the check for private memory, otherwise OpenCL CPU
device may generate false positive reports due to stack re-use in
different threads. However, SPIR-V builts 'ToPrivate' doesn't work as
expected on OpenCL CPU device. So we need to manually cleanup private
shadow before each function exit point.
KornevNikita pushed a commit that referenced this pull request May 27, 2025
We need to skip the check for private memory, otherwise OpenCL CPU
device may generate false positive reports due to stack re-use in
different threads. However, SPIR-V builts 'ToPrivate' doesn't work as
expected on OpenCL CPU device. So we need to manually cleanup private
shadow before each function exit point.
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