Skip to content

Commit 5150c92

Browse files
committed
Update MemToShadow for DG2 device
1 parent e268561 commit 5150c92

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

libdevice/sanitizer_utils.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,8 @@ inline uptr MemToShadow_DG2(uptr addr, uint32_t as) {
143143

144144
auto launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo;
145145
if (as == ADDRESS_SPACE_GLOBAL) { // global
146-
uptr shadow_ptr;
147-
if (addr & 0xFFFF000000000000ULL) { // Device USM
148-
shadow_ptr = launch_info->GlobalShadowOffset + 0x80000000000ULL +
149-
((addr & 0x7FFFFFFFFFFFULL) >> ASAN_SHADOW_SCALE);
150-
} else { // Host/Shared USM
151-
shadow_ptr =
152-
launch_info->GlobalShadowOffset + (addr >> ASAN_SHADOW_SCALE);
153-
}
146+
uptr shadow_ptr = launch_info->GlobalShadowOffset +
147+
((addr & 0x0000'FFFF'FFFF'FFFFULL) >> ASAN_SHADOW_SCALE);
154148

155149
ASAN_DEBUG(
156150
const auto shadow_offset_end = launch_info->GlobalShadowOffsetEnd;

0 commit comments

Comments
 (0)