Skip to content

Commit

Permalink
[SYCL][E2E] Disable and fix address sanitizer tests for DG2 (intel#15450
Browse files Browse the repository at this point in the history
)

This commit disables the
AddressSanitizer/invalid-argument/out-of-bounds.cpp and
sycl/test-e2e/AddressSanitizer/invalid-argument/released-pointer.cpp
tests for DG2, following the enabling of address sanitizer tests for DG2
in intel#14891.

Additionally, it fixes the compilation failure in
sycl/test-e2e/AddressSanitizer/nullpointer/global_nullptr.cpp which
should hopefully allow it to pass as expected.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
  • Loading branch information
steffenlarsen authored Sep 20, 2024
1 parent 97dba84 commit 2c9d980
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// RUN: %{build} %device_asan_flags -O2 -g -o %t
// RUN: env SYCL_PREFER_UR=1 UR_LAYER_ASAN_OPTIONS="detect_kernel_arguments:1" %{run} not %t 2>&1 | FileCheck %s

// See https://github.com/intel/llvm/issues/15449
// UNSUPPORTED: gpu-intel-dg2

#include <sycl/detail/core.hpp>

#include <sycl/usm.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// RUN: %{build} %device_asan_flags -O2 -g -o %t
// RUN: env SYCL_PREFER_UR=1 UR_LAYER_ASAN_OPTIONS="quarantine_size_mb:1;detect_kernel_arguments:1" %{run} not %t 2>&1 | FileCheck %s

// See https://github.com/intel/llvm/issues/15449
// UNSUPPORTED: gpu-intel-dg2

#include <sycl/detail/core.hpp>

#include <sycl/usm.hpp>
Expand Down
5 changes: 3 additions & 2 deletions sycl/test-e2e/AddressSanitizer/nullpointer/global_nullptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#include <sycl/detail/core.hpp>

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

int main() {
sycl::queue Q;
constexpr std::size_t N = 4;
Expand All @@ -18,8 +20,7 @@ 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();
Expand Down

0 comments on commit 2c9d980

Please sign in to comment.