Skip to content

Commit

Permalink
[SYCL][E2E] set pointer to nullptr to avoid Device Address Sanitizer …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
yingcong-wu authored Nov 28, 2024
1 parent c58affd commit 3053147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sycl/test-e2e/syclcompat/launch/launch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void test_ptr_arg_launch() {
std::cout << __PRETTY_FUNCTION__ << std::endl;
LaunchTest lt;

int *int_ptr;
int *int_ptr = nullptr;

syclcompat::launch<int_ptr_kernel>(lt.range_1_, int_ptr);
syclcompat::launch<int_ptr_kernel>(lt.range_2_, int_ptr);
Expand Down

0 comments on commit 3053147

Please sign in to comment.