File tree Expand file tree Collapse file tree 6 files changed +25
-19
lines changed
sycl/test-e2e/MemorySanitizer/track-origins Expand file tree Collapse file tree 6 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 1
1
// REQUIRES: linux, cpu || (gpu && level_zero)
2
- // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t2 .out
3
- // RUN: %{run} %t2 .out 2>&1 | FileCheck %s
2
+ // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t1 .out
3
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1 .out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
4
4
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O1 -g -o %t2.out
5
- // RUN: %{run} %t2.out 2>&1 | FileCheck %s
5
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK
6
6
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t3.out
7
- // RUN: %{run} %t3.out 2>&1 | FileCheck %s
7
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK
8
8
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK-HOSTUSM
9
9
10
10
#include < sycl/detail/core.hpp>
@@ -25,7 +25,7 @@ int main() {
25
25
// CHECK: kernel <{{.*MyKernel}}>
26
26
// CHECK: #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-6]]
27
27
// CHECK: ORIGIN: Host USM allocation
28
- // CHECK: #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-11]]
28
+ // CHECK-ORIGIN-STACK : #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-11]]
29
29
// CHECK-HOSTUSM-NOT: use-of-uninitialized-value
30
30
31
31
sycl::free (array, Q);
Original file line number Diff line number Diff line change 1
1
// REQUIRES: linux, cpu || (gpu && level_zero)
2
+ // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out
3
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
2
4
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out
3
- // RUN: %{run} %t1.out 2>&1 | FileCheck %s
5
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s
4
6
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes CHECK-HOSTUSM
5
7
6
8
#include < sycl/detail/core.hpp>
@@ -22,7 +24,7 @@ int main() {
22
24
// CHECK: kernel <{{.*MyKernel}}>
23
25
// CHECK: #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-6]]
24
26
// CHECK: ORIGIN: Host USM allocation
25
- // CHECK: #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-12]]
27
+ // CHECK-ORIGIN-STACK : #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-12]]
26
28
// CHECK-HOSTUSM-NOT: use-of-uninitialized-value
27
29
28
30
sycl::free (array, Q);
Original file line number Diff line number Diff line change 1
1
// REQUIRES: linux, cpu || (gpu && level_zero)
2
2
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out
3
- // RUN: %{run} %t1.out 2>&1 | FileCheck %s
3
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s
4
4
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -DINIT_SOURCE -O2 -g -o %t2.out
5
- // RUN: %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT
5
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT
6
6
7
7
#include < sycl/detail/core.hpp>
8
8
#include < sycl/usm.hpp>
Original file line number Diff line number Diff line change 1
1
// REQUIRES: linux, cpu || (gpu && level_zero)
2
+ // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out
3
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
2
4
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out
3
- // RUN: %{run} %t1.out 2>&1 | FileCheck %s
5
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s
4
6
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -DINIT_SOURCE -O2 -g -o %t2.out
5
- // RUN: %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT
7
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT
6
8
7
9
#include < sycl/detail/core.hpp>
8
10
#include < sycl/usm.hpp>
@@ -36,7 +38,7 @@ void no_overlap() {
36
38
// CHECK: kernel <{{.*MyKernel3}}>
37
39
// CHECK: #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-6]]
38
40
// CHECK: ORIGIN: Host USM allocation
39
- // CHECK: #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-24]]
41
+ // CHECK-ORIGIN-STACK : #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-24]]
40
42
// CHECK-INIT-NOT: use-of-uninitialized-value
41
43
42
44
sycl::free (array1, Q);
Original file line number Diff line number Diff line change 1
1
// REQUIRES: linux, cpu || (gpu && level_zero)
2
+ // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out
3
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
2
4
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out
3
- // RUN: %{run} %t1.out 2>&1 | FileCheck %s
5
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s
4
6
5
7
#include < sycl/detail/core.hpp>
6
8
#include < sycl/usm.hpp>
@@ -30,7 +32,7 @@ void overlap() {
30
32
// CHECK: kernel <{{.*MyKernel2}}>
31
33
// CHECK: #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-6]]
32
34
// CHECK: ORIGIN: Shared USM allocation
33
- // CHECK: #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-20]]
35
+ // CHECK-ORIGIN-STACK : #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-20]]
34
36
35
37
sycl::free (array, Q);
36
38
}
Original file line number Diff line number Diff line change 1
1
// REQUIRES: linux, cpu || (gpu && level_zero)
2
- // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t2 .out
3
- // RUN: %{run} %t2 .out 2>&1 | FileCheck %s
2
+ // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t1 .out
3
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1 .out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
4
4
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O1 -g -o %t2.out
5
- // RUN: %{run} %t2.out 2>&1 | FileCheck %s
5
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s
6
6
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t3.out
7
- // RUN: %{run} %t3.out 2>&1 | FileCheck %s
7
+ // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t3.out 2>&1 | FileCheck %s
8
8
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK-SHAREDUSM
9
9
10
10
#include < sycl/detail/core.hpp>
@@ -25,7 +25,7 @@ int main() {
25
25
// CHECK: kernel <{{.*MyKernel}}>
26
26
// CHECK: #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-6]]
27
27
// CHECK: ORIGIN: Shared USM allocation
28
- // CHECK: #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-11]]
28
+ // CHECK-ORIGIN-STACK : #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-11]]
29
29
// CHECK-SHAREDUSM-NOT: use-of-uninitialized-value
30
30
31
31
sycl::free (array, Q);
You can’t perform that action at this time.
0 commit comments