Skip to content

[DeviceSAN] Fix asan and msan lit tests crashed on CPU #18525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libdevice/sanitizer/asan_rtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,8 @@ static __SYCL_CONSTANT__ const char __asan_print_private_base[] =
DEVICE_EXTERN_C_NOINLINE void
__asan_set_private_base(__SYCL_PRIVATE__ void *ptr) {
auto launch_info = (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo;
if (!launch_info || launch_info->PrivateShadowOffset == 0)
if (!launch_info || launch_info->PrivateShadowOffset == 0 ||
launch_info->PrivateBase == 0)
return;
// Only set on the first sub-group item
if (__spirv_BuiltInSubgroupLocalInvocationId != 0)
Expand Down
3 changes: 2 additions & 1 deletion libdevice/sanitizer/msan_rtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ static __SYCL_CONSTANT__ const char __msan_print_private_base[] =

DEVICE_EXTERN_C_NOINLINE void
__msan_set_private_base(__SYCL_PRIVATE__ void *ptr) {
if (!GetMsanLaunchInfo || GetMsanLaunchInfo->PrivateShadowOffset == 0)
if (!GetMsanLaunchInfo || GetMsanLaunchInfo->PrivateShadowOffset == 0 ||
GetMsanLaunchInfo->PrivateBase == 0)
return;
// Only set on the first sub-group item
if (__spirv_BuiltInSubgroupLocalInvocationId != 0)
Expand Down
Loading