Skip to content

Commit 1a07d0c

Browse files
zhaomaosuAlexeySachkov
authored andcommitted
[UR][DeviceSantizer] Enable Symoblizer for UR santizer layer (intel#14911)
Re-land PR intel#14513 UR Part: oneapi-src/unified-runtime#1920
1 parent acc3f43 commit 1a07d0c

File tree

6 files changed

+17
-0
lines changed

6 files changed

+17
-0
lines changed

sycl/cmake/modules/FetchUnifiedRuntime.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ option(SYCL_UMF_DISABLE_HWLOC
3030
set(UR_BUILD_EXAMPLES OFF CACHE BOOL "Build example applications." FORCE)
3131
set(UR_BUILD_TESTS OFF CACHE BOOL "Build unit tests." FORCE)
3232
set(UR_BUILD_XPTI_LIBS OFF)
33+
set(UR_ENABLE_SYMBOLIZER ON CACHE BOOL "Enable symbolizer for sanitizer layer.")
3334
set(UR_ENABLE_TRACING ON)
3435

3536
if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)

sycl/test-e2e/AddressSanitizer/bad-free/bad-free-minus1.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ int main() {
2727
// CHECK-HOST: [[ADDR]] is located inside of Host USM region {{\[0x.*, 0x.*\)}}
2828
// CHECK-SHARED: [[ADDR]] is located inside of Shared USM region {{\[0x.*, 0x.*\)}}
2929
// CHECK-DEVICE: [[ADDR]] is located inside of Device USM region {{\[0x.*, 0x.*\)}}
30+
// CHECK: allocated here:
31+
// CHECK-HOST: in main {{.*bad-free-minus1.cpp:}}[[@LINE-15]]
32+
// CHECK-SHARED: in main {{.*bad-free-minus1.cpp:}}[[@LINE-14]]
33+
// CHECK-DEVICE: in main {{.*bad-free-minus1.cpp:}}[[@LINE-13]]

sycl/test-e2e/AddressSanitizer/bad-free/bad-free-plus1.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,9 @@ int main() {
2525
// CHECK-HOST: [[ADDR]] is located inside of Host USM region {{\[0x.*, 0x.*\)}}
2626
// CHECK-SHARED: [[ADDR]] is located inside of Shared USM region {{\[0x.*, 0x.*\)}}
2727
// CHECK-DEVICE: [[ADDR]] is located inside of Device USM region {{\[0x.*, 0x.*\)}}
28+
// CHECK: allocated here:
29+
// CHECK-HOST: in main {{.*bad-free-plus1.cpp:}}[[@LINE-13]]
30+
// CHECK-SHARED: in main {{.*bad-free-plus1.cpp:}}[[@LINE-12]]
31+
// CHECK-DEVICE: in main {{.*bad-free-plus1.cpp:}}[[@LINE-11]]
2832
return 0;
2933
}

sycl/test-e2e/AddressSanitizer/double-free/double-free.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@ int main() {
3030
// CHECK-SHARED: [[ADDR]] is located inside of Shared USM region {{\[0x.*, 0x.*\)}}
3131
// CHECK-DEVICE: [[ADDR]] is located inside of Device USM region {{\[0x.*, 0x.*\)}}
3232
// CHECK: freed here
33+
// CHECH: in main {{.*double-free.cpp:}}[@LINE-33]
3334
// CHECK: previously allocated here
35+
// CHECK-HOST: in main {{.*double-free.cpp:}}[[@LINE-19]]
36+
// CHECK-SHARED: in main {{.*double-free.cpp:}}[[@LINE-18]]
37+
// CHECK-DEVICE: in main {{.*double-free.cpp:}}[[@LINE-17]]

sycl/test-e2e/AddressSanitizer/use-after-free/quarantine-no-free.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ int main() {
4646
// CHECK: #0 {{.*}} {{.*quarantine-no-free.cpp}}:[[@LINE-5]]
4747
// CHECK: [[ADDR]] is located inside of Device USM region [{{0x.*}}, {{0x.*}})
4848
// CHECK: allocated here:
49+
// CHECK: in main {{.*quarantine-no-free.cpp}}:[[@LINE-27]]
4950
// CHECK: freed here:
51+
// CHECK: in main {{.*quarantine-no-free.cpp}}:[[@LINE-25]]
5052

5153
return 0;
5254
}

sycl/test-e2e/AddressSanitizer/use-after-free/use-after-free.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ int main() {
2121
// CHECK: #0 {{.*}} {{.*use-after-free.cpp:}}[[@LINE-5]]
2222
// CHECK: [[ADDR]] is located inside of Device USM region [{{0x.*}}, {{0x.*}})
2323
// CHECK: allocated here:
24+
// CHECK: in main {{.*use-after-free.cpp:}}[[@LINE-14]]
2425
// CHECK: freed here:
26+
// CHECK: in main {{.*use-after-free.cpp:}}[[@LINE-15]]
2527

2628
return 0;
2729
}

0 commit comments

Comments
 (0)