Skip to content

Commit

Permalink
enable private_nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZyne committed Nov 6, 2024
1 parent 036fff0 commit 3e5f870
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
// RUN: %{build} %device_asan_flags -O2 -g -o %t3.out
// RUN: %{run} not %t3.out 2>&1 | FileCheck %s

// FIXME: There's an issue in gfx driver, so this test pending here.
// XFAIL: *

#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/address_cast.hpp>

Expand All @@ -22,15 +19,14 @@ int main() {
sycl::nd_range<1>(N, 1), [=](sycl::nd_item<1> item) {
auto private_array =
sycl::ext::oneapi::experimental::static_address_cast<
sycl::access::address_space::private_space,
sycl::access::decorated::no>(array);
sycl::access::address_space::private_space>(array);
private_array[0] = 0;
});
Q.wait();
});
// CHECK: ERROR: DeviceSanitizer: null-pointer-access on Unknown Memory
// CHECK: WRITE of size 4 at kernel {{<.*MyKernel>}} LID(0, 0, 0) GID({{.*}}, 0, 0)
// CHECK: {{.*private_nullptr.cpp}}:[[@LINE-5]]
// CHECK: {{.*private_nullptr.cpp}}:[[@LINE-6]]

return 0;
}

0 comments on commit 3e5f870

Please sign in to comment.