Skip to content

Commit e772e25

Browse files
committed
[hwasan] Fix wild free tests on x86.
1 parent 10c8f78 commit e772e25

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler-rt/test/hwasan/TestCases/wild-free-close.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main() {
1212
// CHECK: ALLOC {{[0x]+}}[[ADDR:.*]]
1313
free(p - 8);
1414
// CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{.*}} at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
15-
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in free
15+
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}free
1616
// CHECK: #1 {{.*}} in main {{.*}}wild-free-close.c:[[@LINE-3]]
1717
// CHECK: is located 8 bytes to the left of 1-byte region [{{[0x]+}}{{.*}}[[ADDR]]
1818
// CHECK-NOT: Segmentation fault

compiler-rt/test/hwasan/TestCases/wild-free-realloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int main() {
66
char *p = (char *)malloc(1);
77
realloc(p + 0x10000000000, 2);
88
// CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{.*}} at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
9-
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in realloc
9+
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}realloc
1010
// CHECK: #1 {{.*}} in main {{.*}}wild-free-realloc.c:[[@LINE-3]]
1111
// CHECK-NOT: Segmentation fault
1212
// CHECK-NOT: SIGSEGV

compiler-rt/test/hwasan/TestCases/wild-free-shadow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ int main() {
88
char *p = (char *)malloc(1);
99
free(__hwasan_shadow_memory_dynamic_address);
1010
// CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{[0x]+}}[[PTR:.*]] at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
11-
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in free
11+
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}free
1212
// CHECK: #1 {{.*}} in main {{.*}}wild-free-shadow.c:[[@LINE-3]]
1313
// CHECK: {{[0x]+}}{{.*}}[[PTR]] is HWAsan shadow memory.
1414
// CHECK-NOT: Segmentation fault

compiler-rt/test/hwasan/TestCases/wild-free.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int main() {
66
char *p = (char *)malloc(1);
77
free(p + 0x10000000000);
88
// CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{.*}} at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
9-
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in free
9+
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}free
1010
// CHECK: #1 {{.*}} in main {{.*}}wild-free.c:[[@LINE-3]]
1111
// CHECK-NOT: Segmentation fault
1212
// CHECK-NOT: SIGSEGV

0 commit comments

Comments
 (0)