Skip to content

Commit

Permalink
[hwasan] Fix wild free tests on x86.
Browse files Browse the repository at this point in the history
  • Loading branch information
fmayer committed Aug 13, 2021
1 parent 10c8f78 commit e772e25
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler-rt/test/hwasan/TestCases/wild-free-close.c
Expand Up @@ -12,7 +12,7 @@ int main() {
// CHECK: ALLOC {{[0x]+}}[[ADDR:.*]]
free(p - 8);
// CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{.*}} at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in free
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}free
// CHECK: #1 {{.*}} in main {{.*}}wild-free-close.c:[[@LINE-3]]
// CHECK: is located 8 bytes to the left of 1-byte region [{{[0x]+}}{{.*}}[[ADDR]]
// CHECK-NOT: Segmentation fault
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/hwasan/TestCases/wild-free-realloc.c
Expand Up @@ -6,7 +6,7 @@ int main() {
char *p = (char *)malloc(1);
realloc(p + 0x10000000000, 2);
// CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{.*}} at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in realloc
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}realloc
// CHECK: #1 {{.*}} in main {{.*}}wild-free-realloc.c:[[@LINE-3]]
// CHECK-NOT: Segmentation fault
// CHECK-NOT: SIGSEGV
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/hwasan/TestCases/wild-free-shadow.c
Expand Up @@ -8,7 +8,7 @@ int main() {
char *p = (char *)malloc(1);
free(__hwasan_shadow_memory_dynamic_address);
// CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{[0x]+}}[[PTR:.*]] at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in free
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}free
// CHECK: #1 {{.*}} in main {{.*}}wild-free-shadow.c:[[@LINE-3]]
// CHECK: {{[0x]+}}{{.*}}[[PTR]] is HWAsan shadow memory.
// CHECK-NOT: Segmentation fault
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/hwasan/TestCases/wild-free.c
Expand Up @@ -6,7 +6,7 @@ int main() {
char *p = (char *)malloc(1);
free(p + 0x10000000000);
// CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{.*}} at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in free
// CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}free
// CHECK: #1 {{.*}} in main {{.*}}wild-free.c:[[@LINE-3]]
// CHECK-NOT: Segmentation fault
// CHECK-NOT: SIGSEGV
Expand Down

0 comments on commit e772e25

Please sign in to comment.