Skip to content

Commit ef25b12

Browse files
committed
Adapt some ASan lit-tests to LLVM 20
Where the ASan pass now apparently adds a `nosanitize_address` IR module flag, breaking these tests.
1 parent 1c1d703 commit ef25b12

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

tests/sanitizers/attr_nosanitize.d

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,25 @@ extern (C): // For easier name mangling
1111

1212
version (NORMAL)
1313
{
14-
// NORMAL: sanitize_address
15-
// NORMAL: sanitize_thread
14+
// NORMAL: ; Function Attrs:{{.*}} sanitize_address sanitize_thread
15+
// NORMAL-NEXT: define void {{.*}}foo
1616
void foo()
1717
{
1818
}
1919
}
2020
else version (NOSANITIZE)
2121
{
2222
// NOSANITIZE-NOT: sanitize_address
23-
// NOSANITIZE: sanitize_thread
23+
// NOSANITIZE: sanitize_thread
2424
// NOSANITIZE-NOT: sanitize_address
25+
// NOSANITIZE: define void {{.*}}foo_noaddress
2526
@noSanitize("address")
2627
void foo_noaddress()
2728
{
2829
}
2930

31+
// NOSANITIZE-NOT: ; Function Attrs:{{.*}} sanitize_
32+
// NOSANITIZE: define void {{.*}}foo_nothread_noaddress
3033
@noSanitize("thread")
3134
@noSanitize("address")
3235
void foo_nothread_noaddress()

tests/sanitizers/fsanitize_blacklist_file1.d

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
// RUN: -fsanitize-blacklist=%S/inputs/fsanitize_blacklist_file.txt \
66
// RUN: -of=%t.ll %s && FileCheck %s < %t.ll
77

8-
// CHECK-LABEL: define {{.*}}9foofoofoo
9-
// CHECK-SAME: #[[ATTR_WITHASAN:[0-9]+]]
8+
// CHECK: ; Function Attrs:{{.*}} sanitize_address
9+
// CHECK-NEXT: define void {{.*}}9foofoofoo
1010
void foofoofoo(int* i)
1111
{
1212
// CHECK: call {{.*}}_asan
1313
*i = 1;
1414
}
15-
16-
//CHECK: attributes #[[ATTR_WITHASAN]] ={{.*}}sanitize_address

tests/sanitizers/fsanitize_blacklist_file2.d

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
// RUN: -fsanitize-blacklist=%S/inputs/fsanitize_blacklist_file.txt \
66
// RUN: -of=%t.ll %s && FileCheck %s < %t.ll
77

8-
// CHECK-LABEL: define {{.*}}9foofoofoo
9-
// CHECK-SAME: #[[ATTR_NOASAN:[0-9]+]]
8+
// CHECK-NOT: ; Function Attrs:{{.*}} sanitize_address
9+
// CHECK: define void {{.*}}9foofoofoo
1010
void foofoofoo(int* i)
1111
{
1212
*i = 1;
1313
}
14-
//CHECK: attributes #[[ATTR_NOASAN]]
15-
//CHECK-NOT: sanitize_address

0 commit comments

Comments
 (0)