-
Notifications
You must be signed in to change notification settings - Fork 787
[DeviceAddressSanitizer] Add warning for unaligned __asan_mem_to_shadow call #18879
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
[DeviceAddressSanitizer] Add warning for unaligned __asan_mem_to_shadow call #18879
Conversation
Failure looks like infrastructure problem. |
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 PR skips certain AddressSanitizer tests on OpenCL CPU devices at -O0 due to subgroup alignment issues, and adds a runtime warning when __asan_mem_to_shadow()
is called with an unaligned pointer.
- Introduce
%if !cpu
guards to skip O0 tests on OpenCL CPU in three SYCL test files. - Add a static warning message and
__spirv_ocl_printf
call in__asan_mem_to_shadow
for unaligned addresses.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
sycl/test-e2e/AddressSanitizer/out-of-bounds/local/group_local_memory_func.cpp | Skip O0 test run on CPU targets |
sycl/test-e2e/AddressSanitizer/out-of-bounds/local/group_local_memory.cpp | Skip O0 test run on CPU targets |
sycl/test-e2e/AddressSanitizer/out-of-bounds/buffer/buffer_3d.cpp | Skip O0 test run on CPU targets; added O2 run step |
libdevice/sanitizer/asan_rtl.cpp | Added unaligned-address warning in __asan_mem_to_shadow |
Comments suppressed due to low confidence (2)
sycl/test-e2e/AddressSanitizer/out-of-bounds/local/group_local_memory_func.cpp:7
- After building the O2 variant, a corresponding
// RUN: not %t3.out 2>&1 | FileCheck %s
step is missing, so the O2 test case isn’t exercised.
// RUN: %{build} %device_asan_flags -g -O2 -o %t3.out
sycl/test-e2e/AddressSanitizer/out-of-bounds/local/group_local_memory.cpp:7
- The O2 build is added but there’s no
// RUN: not %t3.out 2>&1 | FileCheck %s
invocation, so test coverage for -O2 is absent.
// RUN: %{build} %device_asan_flags -g -O2 -o %t3.out
sycl/test-e2e/AddressSanitizer/out-of-bounds/local/group_local_memory_func.cpp
Outdated
Show resolved
Hide resolved
Hi @intel/llvm-gatekeepers , this PR is ready to merge, thanks. |
And skip some test affected by OpenCL CPU subgroup buffer alignment issue.
This PR addresses #18743.