-
Notifications
You must be signed in to change notification settings - Fork 798
[DevMSAN] Unpoison sret argument for builtin function to get spec constant #19800
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
Conversation
…stant For builtin func like "__sycl_getComposite2020SpecConstantValue", if structs which are larger than 64b will be returned via sret arguments and will be initialized inside the function. So we need to unpoison the sret arguments.
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.
Pull Request Overview
This pull request implements support for unpoisoning sret (struct return) arguments for SYCL builtin functions that return large structs (>64 bits) in MemorySanitizer. The main change addresses the fact that these builtin functions initialize struct return values internally, requiring the memory sanitizer to mark these return values as clean.
- Adds special handling for
__sycl_getComposite2020SpecConstantValue
builtin function in MemorySanitizer - Implements a new runtime function
__msan_unpoison_shadow
for unpoisoning arbitrary memory regions - Updates test configurations to set
ZE_AFFINITY_MASK=0
for sanitizer tests
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | Adds detection and handling of SYCL builtin functions with sret parameters, unpoisoning their return values |
libdevice/sanitizer/msan_rtl.cpp | Implements new __msan_unpoison_shadow runtime function and refactors debug message constants |
llvm/test/Instrumentation/MemorySanitizer/SPIRV/spec_constants.ll | Adds test case verifying correct unpoisoning of sret arguments for spec constant builtin functions |
sycl/test-e2e/ThreadSanitizer/lit.local.cfg | Sets ZE_AFFINITY_MASK environment variable for test isolation |
sycl/test-e2e/MemorySanitizer/lit.local.cfg | Sets ZE_AFFINITY_MASK environment variable for test isolation |
sycl/test-e2e/AddressSanitizer/lit.local.cfg | Sets ZE_AFFINITY_MASK environment variable for test isolation |
Hi @intel/llvm-gatekeepers, this PR is ready to be merged. Thanks. |
Uh oh!
There was an error while loading. Please reload this page.