[compiler-rt] e772e25 - [hwasan] Fix wild free tests on x86.
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 13 03:56:22 PDT 2021
Author: Florian Mayer
Date: 2021-08-13T11:56:02+01:00
New Revision: e772e25547b748812d61561a8a444e3c42a4cfc2
URL: https://github.com/llvm/llvm-project/commit/e772e25547b748812d61561a8a444e3c42a4cfc2
DIFF: https://github.com/llvm/llvm-project/commit/e772e25547b748812d61561a8a444e3c42a4cfc2.diff
LOG: [hwasan] Fix wild free tests on x86.
Added:
Modified:
compiler-rt/test/hwasan/TestCases/wild-free-close.c
compiler-rt/test/hwasan/TestCases/wild-free-realloc.c
compiler-rt/test/hwasan/TestCases/wild-free-shadow.c
compiler-rt/test/hwasan/TestCases/wild-free.c
Removed:
################################################################################
diff --git a/compiler-rt/test/hwasan/TestCases/wild-free-close.c b/compiler-rt/test/hwasan/TestCases/wild-free-close.c
index 5c4c0863899e..51eb949dcdc9 100644
--- a/compiler-rt/test/hwasan/TestCases/wild-free-close.c
+++ b/compiler-rt/test/hwasan/TestCases/wild-free-close.c
@@ -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
diff --git a/compiler-rt/test/hwasan/TestCases/wild-free-realloc.c b/compiler-rt/test/hwasan/TestCases/wild-free-realloc.c
index e87cd8caa703..1bbbb73add5c 100644
--- a/compiler-rt/test/hwasan/TestCases/wild-free-realloc.c
+++ b/compiler-rt/test/hwasan/TestCases/wild-free-realloc.c
@@ -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
diff --git a/compiler-rt/test/hwasan/TestCases/wild-free-shadow.c b/compiler-rt/test/hwasan/TestCases/wild-free-shadow.c
index c2c512cf94eb..7810e26dfffd 100644
--- a/compiler-rt/test/hwasan/TestCases/wild-free-shadow.c
+++ b/compiler-rt/test/hwasan/TestCases/wild-free-shadow.c
@@ -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
diff --git a/compiler-rt/test/hwasan/TestCases/wild-free.c b/compiler-rt/test/hwasan/TestCases/wild-free.c
index 7cb98f1a1d8c..523d915b2ec8 100644
--- a/compiler-rt/test/hwasan/TestCases/wild-free.c
+++ b/compiler-rt/test/hwasan/TestCases/wild-free.c
@@ -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
More information about the llvm-commits
mailing list