Skip to content

Commit

Permalink
[UR][DeviceSantizer] Enable Symoblizer for UR santizer layer (#14513)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaomaosu committed Aug 1, 2024
1 parent 623bf14 commit 56b1410
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option(SYCL_UMF_DISABLE_HWLOC
set(UR_BUILD_EXAMPLES OFF CACHE BOOL "Build example applications." FORCE)
set(UR_BUILD_TESTS OFF CACHE BOOL "Build unit tests." FORCE)
set(UR_BUILD_XPTI_LIBS OFF)
set(UR_ENABLE_SYMBOLIZER ON CACHE BOOL "Enable symbolizer for sanitizer layer.")
set(UR_ENABLE_TRACING ON)

if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
Expand Down
4 changes: 4 additions & 0 deletions sycl/test-e2e/AddressSanitizer/bad-free/bad-free-minus1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ int main() {
// CHECK-HOST: [[ADDR]] is located inside of Host USM region {{\[0x.*, 0x.*\)}}
// CHECK-SHARED: [[ADDR]] is located inside of Shared USM region {{\[0x.*, 0x.*\)}}
// CHECK-DEVICE: [[ADDR]] is located inside of Device USM region {{\[0x.*, 0x.*\)}}
// CHECK: allocated here:
// CHECK-HOST: in main {{.*bad-free-minus1.cpp:}}[[@LINE-15]]
// CHECK-SHARED: in main {{.*bad-free-minus1.cpp:}}[[@LINE-14]]
// CHECK-DEVICE: in main {{.*bad-free-minus1.cpp:}}[[@LINE-13]]
4 changes: 4 additions & 0 deletions sycl/test-e2e/AddressSanitizer/bad-free/bad-free-plus1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ int main() {
// CHECK-HOST: [[ADDR]] is located inside of Host USM region {{\[0x.*, 0x.*\)}}
// CHECK-SHARED: [[ADDR]] is located inside of Shared USM region {{\[0x.*, 0x.*\)}}
// CHECK-DEVICE: [[ADDR]] is located inside of Device USM region {{\[0x.*, 0x.*\)}}
// CHECK: allocated here:
// CHECK-HOST: in main {{.*bad-free-plus1.cpp:}}[[@LINE-13]]
// CHECK-SHARED: in main {{.*bad-free-plus1.cpp:}}[[@LINE-12]]
// CHECK-DEVICE: in main {{.*bad-free-plus1.cpp:}}[[@LINE-11]]
return 0;
}
4 changes: 4 additions & 0 deletions sycl/test-e2e/AddressSanitizer/double-free/double-free.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ int main() {
// CHECK-SHARED: [[ADDR]] is located inside of Shared USM region {{\[0x.*, 0x.*\)}}
// CHECK-DEVICE: [[ADDR]] is located inside of Device USM region {{\[0x.*, 0x.*\)}}
// CHECK: freed here
// CHECH: in main {{.*double-free.cpp:}}[@LINE-33]
// CHECK: previously allocated here
// CHECK-HOST: in main {{.*double-free.cpp:}}[[@LINE-19]]
// CHECK-SHARED: in main {{.*double-free.cpp:}}[[@LINE-18]]
// CHECK-DEVICE: in main {{.*double-free.cpp:}}[[@LINE-17]]
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ int main() {
// CHECK: #0 {{.*}} {{.*quarantine-no-free.cpp}}:[[@LINE-5]]
// CHECK: [[ADDR]] is located inside of Device USM region [{{0x.*}}, {{0x.*}})
// CHECK: allocated here:
// CHECK: in main {{.*quarantine-no-free.cpp}}:[[@LINE-27]]
// CHECK: released here:
// CHECK: in main {{.*quarantine-no-free.cpp}}:[[@LINE-25]]

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ int main() {
// CHECK: #0 {{.*}} {{.*use-after-free.cpp:}}[[@LINE-5]]
// CHECK: [[ADDR]] is located inside of Device USM region [{{0x.*}}, {{0x.*}})
// CHECK: allocated here:
// CHECK: in main {{.*use-after-free.cpp:}}[[@LINE-14]]
// CHECK: released here:
// CHECK: in main {{.*use-after-free.cpp:}}[[@LINE-15]]

return 0;
}

0 comments on commit 56b1410

Please sign in to comment.