Skip to content

Commit acffb6c

Browse files
committed
address comments
1 parent 20ebf54 commit acffb6c

File tree

4 files changed

+15
-24
lines changed

4 files changed

+15
-24
lines changed

libdevice/sanitizer_utils.cpp

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -675,9 +675,8 @@ constexpr size_t AlignMask(size_t n) { return n - 1; }
675675
DEVICE_EXTERN_C_NOINLINE void __asan_##type##size##_as##as( \
676676
uptr addr, const char __SYCL_CONSTANT__ *file, uint32_t line, \
677677
const char __SYCL_CONSTANT__ *func) { \
678-
if (!__AsanLaunchInfo) { \
678+
if (!__AsanLaunchInfo) \
679679
return; \
680-
} \
681680
if (addr & AlignMask(size)) { \
682681
__asan_report_misalign_error(addr, as, size, is_write, addr, file, line, \
683682
func); \
@@ -690,9 +689,8 @@ constexpr size_t AlignMask(size_t n) { return n - 1; }
690689
DEVICE_EXTERN_C_NOINLINE void __asan_##type##size##_as##as##_noabort( \
691690
uptr addr, const char __SYCL_CONSTANT__ *file, uint32_t line, \
692691
const char __SYCL_CONSTANT__ *func) { \
693-
if (!__AsanLaunchInfo) { \
692+
if (!__AsanLaunchInfo) \
694693
return; \
695-
} \
696694
if (addr & AlignMask(size)) { \
697695
__asan_report_misalign_error(addr, as, size, is_write, addr, file, line, \
698696
func, true); \
@@ -725,9 +723,8 @@ ASAN_REPORT_ERROR(store, true, 16)
725723
DEVICE_EXTERN_C_NOINLINE void __asan_##type##N_as##as( \
726724
uptr addr, size_t size, const char __SYCL_CONSTANT__ *file, \
727725
uint32_t line, const char __SYCL_CONSTANT__ *func) { \
728-
if (!__AsanLaunchInfo) { \
726+
if (!__AsanLaunchInfo) \
729727
return; \
730-
} \
731728
if (auto poisoned_addr = __asan_region_is_poisoned(addr, as, size)) { \
732729
__asan_report_access_error(addr, as, size, is_write, poisoned_addr, \
733730
file, line, func); \
@@ -736,9 +733,8 @@ ASAN_REPORT_ERROR(store, true, 16)
736733
DEVICE_EXTERN_C_NOINLINE void __asan_##type##N_as##as##_noabort( \
737734
uptr addr, size_t size, const char __SYCL_CONSTANT__ *file, \
738735
uint32_t line, const char __SYCL_CONSTANT__ *func) { \
739-
if (!__AsanLaunchInfo) { \
736+
if (!__AsanLaunchInfo) \
740737
return; \
741-
} \
742738
if (auto poisoned_addr = __asan_region_is_poisoned(addr, as, size)) { \
743739
__asan_report_access_error(addr, as, size, is_write, poisoned_addr, \
744740
file, line, func, true); \
@@ -760,9 +756,9 @@ ASAN_REPORT_ERROR_N(store, true)
760756
///
761757

762758
DEVICE_EXTERN_C_NOINLINE uptr __asan_mem_to_shadow(uptr ptr, uint32_t as) {
763-
if (!__AsanLaunchInfo) {
759+
if (!__AsanLaunchInfo)
764760
return 0;
765-
}
761+
766762
return MemToShadow(ptr, as);
767763
}
768764

@@ -776,9 +772,8 @@ static __SYCL_CONSTANT__ const char __mem_set_shadow_local[] =
776772
DEVICE_EXTERN_C_NOINLINE void
777773
__asan_set_shadow_static_local(uptr ptr, size_t size,
778774
size_t size_with_redzone) {
779-
if (!__AsanLaunchInfo) {
775+
if (!__AsanLaunchInfo)
780776
return;
781-
}
782777

783778
// Since ptr is aligned to ASAN_SHADOW_GRANULARITY,
784779
// if size != aligned_size, then the buffer tail of ptr is not aligned
@@ -819,9 +814,8 @@ static __SYCL_CONSTANT__ const char __mem_unpoison_shadow_static_local_end[] =
819814
DEVICE_EXTERN_C_NOINLINE void
820815
__asan_unpoison_shadow_static_local(uptr ptr, size_t size,
821816
size_t size_with_redzone) {
822-
if (!__AsanLaunchInfo) {
817+
if (!__AsanLaunchInfo)
823818
return;
824-
}
825819

826820
ASAN_DEBUG(__spirv_ocl_printf(__mem_unpoison_shadow_static_local_begin));
827821

@@ -856,9 +850,8 @@ static __SYCL_CONSTANT__ const char __mem_report_arg_count_incorrect[] =
856850

857851
DEVICE_EXTERN_C_NOINLINE void
858852
__asan_set_shadow_dynamic_local(uptr ptr, uint32_t num_args) {
859-
if (!__AsanLaunchInfo) {
853+
if (!__AsanLaunchInfo)
860854
return;
861-
}
862855

863856
ASAN_DEBUG(__spirv_ocl_printf(__mem_set_shadow_dynamic_local_begin));
864857

@@ -891,9 +884,8 @@ static __SYCL_CONSTANT__ const char __mem_unpoison_shadow_dynamic_local_end[] =
891884

892885
DEVICE_EXTERN_C_NOINLINE void
893886
__asan_unpoison_shadow_dynamic_local(uptr ptr, uint32_t num_args) {
894-
if (!__AsanLaunchInfo) {
887+
if (!__AsanLaunchInfo)
895888
return;
896-
}
897889

898890
ASAN_DEBUG(__spirv_ocl_printf(__mem_unpoison_shadow_dynamic_local_begin));
899891

@@ -931,9 +923,8 @@ static __SYCL_CONSTANT__ const char __mem_set_shadow_private[] =
931923

932924
DEVICE_EXTERN_C_NOINLINE void __asan_set_shadow_private(uptr begin, uptr size,
933925
char val) {
934-
if (!__AsanLaunchInfo) {
926+
if (!__AsanLaunchInfo)
935927
return;
936-
}
937928

938929
ASAN_DEBUG(__spirv_ocl_printf(__mem_set_shadow_private_begin));
939930

sycl/cmake/modules/FetchUnifiedRuntime.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if(SYCL_UR_USE_FETCH_CONTENT)
116116
CACHE PATH "Path to external '${name}' adapter source dir" FORCE)
117117
endfunction()
118118

119-
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
119+
set(UNIFIED_RUNTIME_REPO "https://github.com/AllanZyne/unified-runtime.git")
120120
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/UnifiedRuntimeTag.cmake)
121121

122122
set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")

sycl/cmake/modules/UnifiedRuntimeTag.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Date: Wed Nov 6 11:07:29 2024 +0000
55
# Merge pull request #2082 from RossBrunton/ross/multiadapt
66
# [CI] Add "loader" support to conformance testing
7-
set(UNIFIED_RUNTIME_TAG 3edf99755ce2af3b53102a7d8438e0fe969efac3)
7+
set(UNIFIED_RUNTIME_TAG review/yang/fix_kernel_filter)

sycl/test-e2e/AddressSanitizer/common/kernel-filter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: linux
22
// RUN: %{build} %device_asan_flags -O2 -fsanitize-ignorelist=%p/ignorelist.txt -o %t
3-
// RUN: %{run} not %t &> %t.txt ; FileCheck --input-file %t.txt %s
3+
// RUN: %{run} %t 2>&1 | FileCheck %s
44
// RUN: %{build} %device_asan_flags %if cpu %{ -fsycl-targets=spir64_x86_64 %} %if gpu %{ -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %} -O2 -fsanitize-ignorelist=%p/ignorelist.txt -o %t2
5-
// RUN: %{run} not %t2 &> %t2.txt ; FileCheck --input-file %t2.txt %s
5+
// RUN: %{run} %t2 2>&1 | FileCheck %s
66

77
#include <sycl/detail/core.hpp>
88
#include <sycl/usm.hpp>

0 commit comments

Comments
 (0)