@@ -87,7 +87,8 @@ static __SYCL_CONSTANT__ const char __generic_to[] =
8787
8888#define ASAN_DEBUG (X ) \
8989 do { \
90- auto launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo; \
90+ auto launch_info = \
91+ (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo; \
9192 if (launch_info->Debug ) { \
9293 X; \
9394 } \
@@ -132,7 +133,7 @@ inline void ConvertGenericPointer(uptr &addr, uint32_t &as) {
132133}
133134
134135inline uptr MemToShadow_CPU (uptr addr) {
135- auto launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo;
136+ auto launch_info = (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo;
136137 return launch_info->GlobalShadowOffset + (addr >> ASAN_SHADOW_SCALE);
137138}
138139
@@ -141,7 +142,7 @@ inline uptr MemToShadow_DG2(uptr addr, uint32_t as) {
141142 ConvertGenericPointer (addr, as);
142143 }
143144
144- auto launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo;
145+ auto launch_info = (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo;
145146 if (as == ADDRESS_SPACE_GLOBAL) { // global
146147 uptr shadow_ptr;
147148 if (addr & 0xFFFF000000000000ULL ) { // Device USM
@@ -221,7 +222,7 @@ inline uptr MemToShadow_PVC(uptr addr, uint32_t as) {
221222 ConvertGenericPointer (addr, as);
222223 }
223224
224- auto launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo;
225+ auto launch_info = (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo;
225226 if (as == ADDRESS_SPACE_GLOBAL) { // global
226227 uptr shadow_ptr;
227228 if (addr & 0xFF00000000000000 ) { // Device USM
@@ -301,7 +302,7 @@ inline uptr MemToShadow_PVC(uptr addr, uint32_t as) {
301302inline uptr MemToShadow (uptr addr, uint32_t as) {
302303 uptr shadow_ptr = 0 ;
303304
304- auto launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo;
305+ auto launch_info = (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo;
305306 if (launch_info->DeviceTy == DeviceType::CPU) {
306307 shadow_ptr = MemToShadow_CPU (addr);
307308 } else if (launch_info->DeviceTy == DeviceType::GPU_PVC) {
@@ -378,12 +379,12 @@ void __asan_internal_report_save(DeviceSanitizerErrorType error_type) {
378379 __spirv_BuiltInWorkgroupId.y * __spirv_BuiltInNumWorkgroups.z +
379380 __spirv_BuiltInWorkgroupId.z ;
380381
381- auto &SanitizerReport = ((__SYCL_GLOBAL__ LaunchInfo *)__AsanLaunchInfo)
382+ auto &SanitizerReport = ((__SYCL_GLOBAL__ AsanRuntimeData *)__AsanLaunchInfo)
382383 ->SanitizerReport [WG_LID % ASAN_MAX_NUM_REPORTS];
383384
384385 if (atomicCompareAndSet (
385- &(((__SYCL_GLOBAL__ LaunchInfo *)__AsanLaunchInfo)->ReportFlag ), 1 ,
386- 0 ) == 0 &&
386+ &(((__SYCL_GLOBAL__ AsanRuntimeData *)__AsanLaunchInfo)->ReportFlag ),
387+ 1 , 0 ) == 0 &&
387388 atomicCompareAndSet (&SanitizerReport.Flag , Desired, Expected) ==
388389 Expected) {
389390 SanitizerReport.ErrorType = error_type;
@@ -415,13 +416,13 @@ void __asan_internal_report_save(
415416 __spirv_BuiltInWorkgroupId.y * __spirv_BuiltInNumWorkgroups.z +
416417 __spirv_BuiltInWorkgroupId.z ;
417418
418- auto &SanitizerReport = ((__SYCL_GLOBAL__ LaunchInfo *)__AsanLaunchInfo)
419+ auto &SanitizerReport = ((__SYCL_GLOBAL__ AsanRuntimeData *)__AsanLaunchInfo)
419420 ->SanitizerReport [WG_LID % ASAN_MAX_NUM_REPORTS];
420421
421422 if ((is_recover ||
422423 atomicCompareAndSet (
423- &(((__SYCL_GLOBAL__ LaunchInfo *)__AsanLaunchInfo)->ReportFlag ), 1 ,
424- 0 ) == 0 ) &&
424+ &(((__SYCL_GLOBAL__ AsanRuntimeData *)__AsanLaunchInfo)->ReportFlag ),
425+ 1 , 0 ) == 0 ) &&
425426 atomicCompareAndSet (&SanitizerReport.Flag , Desired, Expected) ==
426427 Expected) {
427428
@@ -818,7 +819,7 @@ DEVICE_EXTERN_C_NOINLINE void
818819__asan_set_shadow_dynamic_local (uptr ptr, uint32_t num_args) {
819820 ASAN_DEBUG (__spirv_ocl_printf (__mem_set_shadow_dynamic_local_begin));
820821
821- auto *launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo;
822+ auto *launch_info = (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo;
822823 if (num_args != launch_info->NumLocalArgs ) {
823824 __spirv_ocl_printf (__mem_report_arg_count_incorrect, num_args,
824825 launch_info->NumLocalArgs );
@@ -849,7 +850,7 @@ DEVICE_EXTERN_C_NOINLINE void
849850__asan_unpoison_shadow_dynamic_local (uptr ptr, uint32_t num_args) {
850851 ASAN_DEBUG (__spirv_ocl_printf (__mem_unpoison_shadow_dynamic_local_begin));
851852
852- auto *launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo;
853+ auto *launch_info = (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo;
853854 if (num_args != launch_info->NumLocalArgs ) {
854855 __spirv_ocl_printf (__mem_report_arg_count_incorrect, num_args,
855856 launch_info->NumLocalArgs );
@@ -885,7 +886,7 @@ DEVICE_EXTERN_C_NOINLINE void __asan_set_shadow_private(uptr begin, uptr size,
885886 char val) {
886887 ASAN_DEBUG (__spirv_ocl_printf (__mem_set_shadow_private_begin));
887888
888- auto *launch_info = (__SYCL_GLOBAL__ const LaunchInfo *)__AsanLaunchInfo;
889+ auto *launch_info = (__SYCL_GLOBAL__ const AsanRuntimeData *)__AsanLaunchInfo;
889890 if (launch_info->PrivateShadowOffset == 0 )
890891 return ;
891892
0 commit comments