Skip to content

Commit aad9850

Browse files
AllanZynekbenzie
authored andcommitted
[DeviceMSAN] Fix empty kernel (#16478)
UR: oneapi-src/unified-runtime#2508 --------- Co-authored-by: Kenneth Benzie (Benie) <[email protected]>
1 parent 924cd31 commit aad9850

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

libdevice/sanitizer/msan_rtl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ inline uptr __msan_get_shadow_pvc(uptr addr, uint32_t as) {
162162
DEVICE_EXTERN_C_NOINLINE void __msan_maybe_warning_##size( \
163163
type s, u32 o, const char __SYCL_CONSTANT__ *file, uint32_t line, \
164164
const char __SYCL_CONSTANT__ *func) { \
165+
if (!__MsanLaunchInfo.get()) \
166+
return; \
165167
if (UNLIKELY(s)) { \
166168
__msan_report_error(size, file, line, func); \
167169
} \
@@ -191,6 +193,9 @@ DEVICE_EXTERN_C_NOINLINE uptr __msan_get_shadow(uptr addr, uint32_t as) {
191193
(uptr)((__SYCL_GLOBAL__ MsanLaunchInfo *)__MsanLaunchInfo.get())
192194
->CleanShadow;
193195

196+
if (!__MsanLaunchInfo.get())
197+
return shadow_ptr;
198+
194199
if (UNLIKELY(!__MsanLaunchInfo)) {
195200
__spirv_ocl_printf(__msan_print_warning_nolaunchinfo);
196201
return shadow_ptr;
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# commit 13f5e52ac047bb81f478f0dbe9416a8bc179130a
2-
# Merge: fe6c83a3 fa1e678a
3-
# Author: aarongreig <aaron.greig@codeplay.com>
4-
# Date: Mon Dec 30 15:14:19 2024 +0000
5-
# Merge pull request #2484 from zhaomaosu/move-clean-shadow-to-launchinfo
6-
# [DevMSAN] Move clean shadow into launch info
7-
set(UNIFIED_RUNTIME_TAG 13f5e52ac047bb81f478f0dbe9416a8bc179130a)
1+
# commit 75745a910cb7197de6e214c1f23c544895afbbb7
2+
# Merge: 0eb08b67 5a7d8fa0
3+
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
4+
# Date: Mon Jan 6 11:21:29 2025 +0000
5+
# Merge pull request #2508 from AllanZyne/review/yang/fix_msan_empty_kernel
6+
# [DeviceMSAN] Fix empty kernel
7+
set(UNIFIED_RUNTIME_TAG 75745a910cb7197de6e214c1f23c544895afbbb7)

0 commit comments

Comments
 (0)