[hwasan] Fix wild free tests on x86.
This commit is contained in:
parent
10c8f78ab8
commit
e772e25547
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue