Skip to content

Commit 3053147

Browse files
authored
[SYCL][E2E] set pointer to nullptr to avoid Device Address Sanitizer complain about invalid pointer. (#16168)
The `int_ptr` is pointed to random memory, which causes the Device Address Sanitizer to complain that it points to unknown memory.
1 parent c58affd commit 3053147

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/test-e2e/syclcompat/launch/launch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void test_ptr_arg_launch() {
119119
std::cout << __PRETTY_FUNCTION__ << std::endl;
120120
LaunchTest lt;
121121

122-
int *int_ptr;
122+
int *int_ptr = nullptr;
123123

124124
syclcompat::launch<int_ptr_kernel>(lt.range_1_, int_ptr);
125125
syclcompat::launch<int_ptr_kernel>(lt.range_2_, int_ptr);

0 commit comments

Comments
 (0)