Skip to content
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

AddressSanitizer/invalid-argument/out-of-bounds.cpp and AddressSanitizer/invalid-argument/released-pointer.cpp fail on DG2 #15449

Closed
steffenlarsen opened this issue Sep 20, 2024 · 2 comments · Fixed by #15469
Labels
bug Something isn't working confirmed

Comments

@steffenlarsen
Copy link
Contributor

steffenlarsen commented Sep 20, 2024

Describe the bug

After enabling address sanitizer tests on DG2 in #14891, the AddressSanitizer/invalid-argument/out-of-bounds.cpp and AddressSanitizer/invalid-argument/released-pointer.cpp tests fail on those devices.

See https://github.com/intel/llvm/actions/runs/10944839386/job/30388112619.

Additional context

Output:

******************** TEST 'SYCL :: AddressSanitizer/invalid-argument/released-pointer.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
.../toolchain/bin//clang++  -Werror  -fsycl -fsycl-targets=spir64  .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/released-pointer.cpp -Xarch_device -fsanitize=address -O2 -g -o .../build-e2e/AddressSanitizer/invalid-argument/Output/released-pointer.cpp.tmp
# executed command: .../toolchain/bin//clang++ -Werror -fsycl -fsycl-targets=spir64 .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/released-pointer.cpp -Xarch_device -fsanitize=address -O2 -g -o .../build-e2e/AddressSanitizer/invalid-argument/Output/released-pointer.cpp.tmp
# note: command had no output on stdout or stderr
# RUN: at line 3
env SYCL_PREFER_UR=1 UR_LAYER_ASAN_OPTIONS="quarantine_size_mb:1;detect_kernel_arguments:1" env ONEAPI_DEVICE_SELECTOR=level_zero:gpu  not .../build-e2e/AddressSanitizer/invalid-argument/Output/released-pointer.cpp.tmp 2>&1 | .../toolchain/bin/FileCheck .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/released-pointer.cpp
# executed command: env SYCL_PREFER_UR=1 'UR_LAYER_ASAN_OPTIONS=quarantine_size_mb:1;detect_kernel_arguments:1' env ONEAPI_DEVICE_SELECTOR=level_zero:gpu not .../build-e2e/AddressSanitizer/invalid-argument/Output/released-pointer.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: .../toolchain/bin/FileCheck .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/released-pointer.cpp
# .---command stderr------------
# | .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/released-pointer.cpp:19:12: error: CHECK: expected string not found in input
# |  // CHECK: The 1th argument {{.*}} is a released USM pointer
# |            ^
# | <stdin>:4:45: note: scanning from here
# | ====ERROR: DeviceSanitizer: invalid-argument on kernel <typeinfo name for main::{lambda(sycl::_V1::handler&)#1}::operator()(sycl::_V1::handler&) const::MyKernel>
# |                                             ^
# | <stdin>:10:20: note: possible intended match here
# | The 0th argument 0xffffd556aa640010 is a released USM pointer
# |                    ^
# | 
# | Input file: <stdin>
# | Check file: .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/released-pointer.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: ZE_LOADER_DEBUG_TRACE:Using Loader Library Path:  
# |             2: ZE_LOADER_DEBUG_TRACE:Tracing Layer Library Path: libze_tracing_layer.so.1 
# |             3:  
# |             4: ====ERROR: DeviceSanitizer: invalid-argument on kernel <typeinfo name for main::{lambda(sycl::_V1::handler&)#1}::operator()(sycl::_V1::handler&) const::MyKernel> 
# | check:19'0                                                 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             5:  #0 in std::_Function_base::~_Function_base() .../include/c++/11/bits/std_function.h:243:11 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             6:  #1 in ?? (/lib/x86_64-linux-gnu/libc.so.6+0x7fa0c6480d90) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             7:  #2 in ?? (/lib/x86_64-linux-gnu/libc.so.6+0x7fa0c6480e40) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             8:  #3 in _start (.../build-e2e/AddressSanitizer/invalid-argument/Output/released-pointer.cpp.tmp+0x402375) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             9:  
# | check:19'0     ~
# |            10: The 0th argument 0xffffd556aa640010 is a released USM pointer 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:19'1                        ?                                           possible intended match
# |            11: 0xffffd556aa640010 is located inside of Device USM region [0xffffd556aa640010, 0xffffd556aa640014) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            12: allocated here: 
# | check:19'0     ~~~~~~~~~~~~~~~~
# |            13:  #0 in int* sycl::_V1::malloc_device<int>(unsigned long, sycl::_V1::queue const&, sycl::_V1::property_list const&, sycl::_V1::detail::code_location const&) .../toolchain/bin/../include/sycl/usm.hpp:180:0 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            14:  #1 in main .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/released-pointer.cpp:11:15 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            15:  #2 in ?? (/lib/x86_64-linux-gnu/libc.so.6+0x7fa0c6480d90) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

********************
FAIL: SYCL :: AddressSanitizer/invalid-argument/out-of-bounds.cpp (26 of 2183)
******************** TEST 'SYCL :: AddressSanitizer/invalid-argument/out-of-bounds.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
.../toolchain/bin//clang++  -Werror  -fsycl -fsycl-targets=spir64  .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/out-of-bounds.cpp -Xarch_device -fsanitize=address -O2 -g -o .../build-e2e/AddressSanitizer/invalid-argument/Output/out-of-bounds.cpp.tmp
# executed command: .../toolchain/bin//clang++ -Werror -fsycl -fsycl-targets=spir64 .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/out-of-bounds.cpp -Xarch_device -fsanitize=address -O2 -g -o .../build-e2e/AddressSanitizer/invalid-argument/Output/out-of-bounds.cpp.tmp
# note: command had no output on stdout or stderr
# RUN: at line 3
env SYCL_PREFER_UR=1 UR_LAYER_ASAN_OPTIONS="detect_kernel_arguments:1" env ONEAPI_DEVICE_SELECTOR=level_zero:gpu  not .../build-e2e/AddressSanitizer/invalid-argument/Output/out-of-bounds.cpp.tmp 2>&1 | .../toolchain/bin/FileCheck .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/out-of-bounds.cpp
# executed command: env SYCL_PREFER_UR=1 UR_LAYER_ASAN_OPTIONS=detect_kernel_arguments:1 env ONEAPI_DEVICE_SELECTOR=level_zero:gpu not .../build-e2e/AddressSanitizer/invalid-argument/Output/out-of-bounds.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: .../toolchain/bin/FileCheck .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/out-of-bounds.cpp
# .---command stderr------------
# | .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/out-of-bounds.cpp:19:12: error: CHECK: expected string not found in input
# |  // CHECK: The 1th argument {{.*}} is located outside of its region
# |            ^
# | <stdin>:4:45: note: scanning from here
# | ====ERROR: DeviceSanitizer: invalid-argument on kernel <typeinfo name for main::{lambda(sycl::_V1::handler&)#1}::operator()(sycl::_V1::handler&) const::MyKernel>
# |                                             ^
# | <stdin>:10:18: note: possible intended match here
# | The 0th argument 0xffffd556aa640014 is located outside of its region [0xffffd556aa640010, 0xffffd556aa640014)
# |                  ^
# | 
# | Input file: <stdin>
# | Check file: .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/out-of-bounds.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: ZE_LOADER_DEBUG_TRACE:Using Loader Library Path:  
# |             2: ZE_LOADER_DEBUG_TRACE:Tracing Layer Library Path: libze_tracing_layer.so.1 
# |             3:  
# |             4: ====ERROR: DeviceSanitizer: invalid-argument on kernel <typeinfo name for main::{lambda(sycl::_V1::handler&)#1}::operator()(sycl::_V1::handler&) const::MyKernel> 
# | check:19'0                                                 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             5:  #0 in std::_Function_base::~_Function_base() .../include/c++/11/bits/std_function.h:243:11 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             6:  #1 in ?? (/lib/x86_64-linux-gnu/libc.so.6+0x7f84db132d90) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             7:  #2 in ?? (/lib/x86_64-linux-gnu/libc.so.6+0x7f84db132e40) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             8:  #3 in _start (.../build-e2e/AddressSanitizer/invalid-argument/Output/out-of-bounds.cpp.tmp+0x402365) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             9:  
# | check:19'0     ~
# |            10: The 0th argument 0xffffd556aa640014 is located outside of its region [0xffffd556aa640010, 0xffffd556aa640014) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:19'1                      ?                                                                                             possible intended match
# |            11: allocated here: 
# | check:19'0     ~~~~~~~~~~~~~~~~
# |            12:  #0 in int* sycl::_V1::malloc_device<int>(unsigned long, sycl::_V1::queue const&, sycl::_V1::property_list const&, sycl::_V1::detail::code_location const&) .../toolchain/bin/../include/sycl/usm.hpp:180:0 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            13:  #1 in main .../llvm/sycl/test-e2e/AddressSanitizer/invalid-argument/out-of-bounds.cpp:11:15 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            14:  #2 in ?? (/lib/x86_64-linux-gnu/libc.so.6+0x7f84db132d90) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            15:  #3 in ?? (/lib/x86_64-linux-gnu/libc.so.6+0x7f84db132e40) 
# | check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--
@steffenlarsen steffenlarsen added bug Something isn't working confirmed labels Sep 20, 2024
@steffenlarsen
Copy link
Contributor Author

Tag @AllanZyne & @yingcong-wu for awareness. I will go disable the tests and hopefully fix global_nullptr.cpp in another patch.

@intel intel deleted a comment Sep 20, 2024
@AllanZyne
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants