File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed
test-e2e/AddressSanitizer/invalid-argument Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 1
- # commit 023a84744b7db460d42225c8b5ea4d6def085c81
2
- # Merge: 9b57d7b7 0607d2c8
1
+ # commit eaea885d5477c8936209175a5b00062ca44f5765
2
+ # Merge: af4ab49c 2a03334c
3
3
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
4
- # Date: Thu Jan 16 10:17:25 2025 +0000
5
- # Merge pull request #2546 from lukaszstolarczuk/bump-umf-to-latest-main
6
- # [main] Bump UMF to v0.10.1
7
- set (UNIFIED_RUNTIME_TAG 023a84744b7db460d42225c8b5ea4d6def085c81 )
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 1
1
// REQUIRES: linux, cpu || (gpu && level_zero)
2
2
// 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
4
4
5
5
#include < sycl/detail/core.hpp>
6
6
#include < sycl/usm.hpp>
7
7
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
-
14
8
int main () {
15
9
sycl::queue Q;
10
+ auto *array = sycl::malloc_device<uintptr_t >(1 , Q);
16
11
auto hostPtr = new int ;
17
12
18
13
Q.submit ([&](sycl::handler &h) {
19
- h.single_task <class MyKernel >([=]() { *hostPtr = 0 ; });
14
+ h.single_task <class MyKernel >([=]() { array[ 0 ] = ( uintptr_t )hostPtr ; });
20
15
});
21
16
Q.wait ();
22
17
23
18
// CHECK-GPU: ERROR: DeviceSanitizer: invalid-argument
24
19
// CHECK-GPU: The {{[0-9]+}}th argument {{.*}} is not a USM pointer
25
20
// CHECK-CPU-NOT: ERROR: DeviceSanitizer: invalid-argument
26
21
22
+ sycl::free (array, Q);
27
23
delete hostPtr;
28
24
puts (" PASS\n " );
29
25
return 0 ;
You can’t perform that action at this time.
0 commit comments