File tree Expand file tree Collapse file tree 2 files changed +11
-15
lines changed
test-e2e/AddressSanitizer/invalid-argument Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 1- # commit 9e48f543b8dd39d45563169433bb529583625dfe
2- # Merge: 6a3fece6 1a1108b3
3- # Author: Martin Grant <martin.morrisongrant @codeplay.com>
4- # Date: Wed Jan 15 14:33:29 2025 +0000
5- # Merge pull request #2540 from martygrant/martin/program-info-unswitch
6- # Move urProgramGetInfo success test from a switch to individual tests.
7- set (UNIFIED_RUNTIME_TAG 9e48f543b8dd39d45563169433bb529583625dfe )
1+ # commit eaea885d5477c8936209175a5b00062ca44f5765
2+ # Merge: af4ab49c 2a03334c
3+ # Author: Kenneth Benzie (Benie) <k.benzie @codeplay.com>
4+ # Date: Thu Jan 16 14:30:47 2025 +0000
5+ # Merge pull request #2569 from zhaomaosu/asan-only-warn-host-ptr
6+ # [DevASAN] Only report warning if passing host ptr to kernel
7+ set (UNIFIED_RUNTIME_TAG eaea885d5477c8936209175a5b00062ca44f5765 )
Original file line number Diff line number Diff line change 11// REQUIRES: linux, cpu || (gpu && level_zero)
22// RUN: %{build} %device_asan_flags -O2 -g -o %t
3- // RUN: env UR_LAYER_ASAN_OPTIONS="detect_kernel_arguments:1" %{run} %if gpu %{ not %} % t 2>&1 | FileCheck --check-prefixes %if cpu %{ CHECK-CPU %} %if gpu %{ CHECK-GPU %} %s
3+ // RUN: env UR_LAYER_ASAN_OPTIONS="detect_kernel_arguments:1" %{run} %t 2>&1 | FileCheck --check-prefixes %if cpu %{ CHECK-CPU %} %if gpu %{ CHECK-GPU %} %s
44
55#include < sycl/detail/core.hpp>
66#include < sycl/usm.hpp>
77
8- // /
9- // / GPU devices don't support shared system USM currently, so passing host
10- // / pointer to kernel is invalid.
11- // / CPU devices support shared system USM.
12- // /
13-
148int main () {
159 sycl::queue Q;
10+ auto *array = sycl::malloc_device<uintptr_t >(1 , Q);
1611 auto hostPtr = new int ;
1712
1813 Q.submit ([&](sycl::handler &h) {
19- h.single_task <class MyKernel >([=]() { *hostPtr = 0 ; });
14+ h.single_task <class MyKernel >([=]() { array[ 0 ] = ( uintptr_t )hostPtr ; });
2015 });
2116 Q.wait ();
2217
2318 // CHECK-GPU: ERROR: DeviceSanitizer: invalid-argument
2419 // CHECK-GPU: The {{[0-9]+}}th argument {{.*}} is not a USM pointer
2520 // CHECK-CPU-NOT: ERROR: DeviceSanitizer: invalid-argument
2621
22+ sycl::free (array, Q);
2723 delete hostPtr;
2824 puts (" PASS\n " );
2925 return 0 ;
You can’t perform that action at this time.
0 commit comments