You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[compiler-rt][asan][tests] Reland: Stabilize wchar tests on Darwin/Android (test-only)
Reland of llvm#161624; depends on revert llvm#162001.
- Android: keep %env_asan_opts=log_to_stderr=1.
- Darwin: use CHECK-DAG for the pre-crash marker and header; frame line matches function only.
- Common: reuse [[ADDR]].
NFC: test-only.
Signed-off-by: Yixuan Cao <[email protected]>
Copy file name to clipboardExpand all lines: compiler-rt/test/asan/TestCases/wcscat.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,10 @@ int main() {
16
16
wchar_t badDst[9];
17
17
wcscpy(badDst, start);
18
18
fprintf(stderr, "Good so far.\n");
19
-
// CHECK: Good so far.
19
+
// CHECK-DAG: Good so far.
20
20
fflush(stderr);
21
21
wcscat(badDst, append); // Boom!
22
-
// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
22
+
// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
23
23
// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0
Copy file name to clipboardExpand all lines: compiler-rt/test/asan/TestCases/wcscpy.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,10 @@ int main() {
13
13
14
14
wchar_t badDst[7];
15
15
fprintf(stderr, "Good so far.\n");
16
-
// CHECK: Good so far.
16
+
// CHECK-DAG: Good so far.
17
17
fflush(stderr);
18
18
wcscpy(badDst, src); // Boom!
19
-
// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
19
+
// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
20
20
// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0
Copy file name to clipboardExpand all lines: compiler-rt/test/asan/TestCases/wcsncat.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,10 @@ int main() {
17
17
wcscpy(badDst, start);
18
18
wcsncat(badDst, append, 1);
19
19
fprintf(stderr, "Good so far.\n");
20
-
// CHECK: Good so far.
20
+
// CHECK-DAG: Good so far.
21
21
fflush(stderr);
22
22
wcsncat(badDst, append, 3); // Boom!
23
-
// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
23
+
// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
24
24
// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0
Copy file name to clipboardExpand all lines: compiler-rt/test/asan/TestCases/wcsncpy.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,11 @@ int main() {
14
14
wchar_t badDst[7];
15
15
wcsncpy(badDst, src, 7); // This should still work.
16
16
fprintf(stderr, "Good so far.\n");
17
-
// CHECK: Good so far.
17
+
// CHECK-DAG: Good so far.
18
18
fflush(stderr);
19
19
20
20
wcsncpy(badDst, src, 15); // Boom!
21
-
// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
21
+
// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
22
22
// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0
0 commit comments