Skip to content

Commit b91b8fe

Browse files
authored
[asan][windows] Further relax how deep in the callstack main can be in some asan tests (#92329)
This is needed because there will be an extra layer of wrapper when linking to the static-CRT after the static asan runtime is removed by #81677.
1 parent f049d72 commit b91b8fe

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ int main(void) {
2424
// CHECK: [[ADDR]] is located 0 bytes inside of 4-byte region
2525
// CHECK-LABEL: freed by thread T0 here:
2626
// CHECK: {{#0 .* free }}
27-
// CHECK: {{ #[1-2] .* main .*bitfield_uaf.cpp}}:[[@LINE-4]]
27+
// CHECK: {{ #[1-3] .* main .*bitfield_uaf.cpp}}:[[@LINE-4]]
2828
// CHECK-LABEL: previously allocated by thread T0 here:
2929
// CHECK: {{#0 .* malloc }}
30-
// CHECK: {{ #[1-2] .* main .*bitfield_uaf.cpp}}:[[@LINE-8]]
30+
// CHECK: {{ #[1-3] .* main .*bitfield_uaf.cpp}}:[[@LINE-8]]
3131
make_access(s);
3232
return 0;
3333
}

compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ int main() {
1212
// CHECK: [[ADDR]] is located 4 bytes before 168-byte region
1313
// CHECK: allocated by thread T0 here:
1414
// CHECK: {{#0 .* calloc }}
15-
// CHECK: {{ #[1-2] .* main .*calloc_left_oob.cpp}}:[[@LINE-8]]
15+
// CHECK: {{ #[1-3] .* main .*calloc_left_oob.cpp}}:[[@LINE-8]]
1616
free(buffer);
1717
}

compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ int main() {
1212
// CHECK: [[ADDR]] is located 0 bytes after 168-byte region
1313
// CHECK: allocated by thread T0 here:
1414
// CHECK-NEXT: {{#0 .* calloc }}
15-
// CHECK: {{ #[1-2] .* main .*calloc_right_oob.cpp}}:[[@LINE-8]]
15+
// CHECK: {{ #[1-3] .* main .*calloc_right_oob.cpp}}:[[@LINE-8]]
1616
free(buffer);
1717
}

compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ int main() {
1313
// CHECK: [[ADDR]] is located 0 bytes inside of 168-byte region
1414
// CHECK: freed by thread T0 here:
1515
// CHECK-NEXT: {{#0 .* free }}
16-
// CHECK: {{ #[1-2] .* main .*calloc_uaf.cpp}}:[[@LINE-8]]
16+
// CHECK: {{ #[1-3] .* main .*calloc_uaf.cpp}}:[[@LINE-8]]
1717
// CHECK: previously allocated by thread T0 here:
1818
// CHECK-NEXT: {{#0 .* calloc }}
19-
// CHECK: {{ #[1-2] .* main .*calloc_uaf.cpp}}:[[@LINE-12]]
19+
// CHECK: {{ #[1-3] .* main .*calloc_uaf.cpp}}:[[@LINE-12]]
2020
}

0 commit comments

Comments
 (0)