Skip to content

Commit 141fbcf

Browse files
authored
[DevASAN] Exit kernel execution when arbitrary access occurs (#20401)
This is to fix issue #20361
1 parent f5092ca commit 141fbcf

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

libdevice/sanitizer/asan_rtl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ inline uptr MemToShadow_DG2(uptr addr, uint32_t as,
131131
launch_info->GlobalShadowLowerBound,
132132
launch_info->GlobalShadowUpperBound));
133133
SaveReport(ErrorType::OUT_OF_BOUNDS, MemoryType::GLOBAL, false, debug);
134+
__devicelib_exit();
134135
return 0;
135136
}
136137

@@ -219,6 +220,7 @@ inline uptr MemToShadow_PVC(uptr addr, uint32_t as,
219220
launch_info->GlobalShadowLowerBound,
220221
launch_info->GlobalShadowUpperBound));
221222
SaveReport(ErrorType::OUT_OF_BOUNDS, MemoryType::GLOBAL, false, debug);
223+
__devicelib_exit();
222224
return 0;
223225
}
224226

sycl/test-e2e/AddressSanitizer/out-of-bounds/USM/arbitrary_access.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
// RUN: %{build} %device_asan_flags -Xarch_device -mllvm=-asan-spir-shadow-bounds=1 -O2 -g -o %t3.out
55
// RUN: %{run} not %t3.out 2>&1 | FileCheck %s
66

7-
// UNSUPPORTED: arch-intel_gpu_pvc
8-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/20361
9-
107
#include <sycl/detail/core.hpp>
118
#include <sycl/usm.hpp>
129

0 commit comments

Comments
 (0)