]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
hwasan: support new dg-output format.
authorMartin Liska <mliska@suse.cz>
Wed, 4 May 2022 07:57:17 +0000 (09:57 +0200)
committerMartin Liska <mliska@suse.cz>
Wed, 4 May 2022 07:59:49 +0000 (09:59 +0200)
Supports change in libsanitizer where it newly reports:
READ of size 4 at 0xffffffffc3d4 tags: 02/01(00) (ptr/mem) in thread T0

So the 'tags' contains now 3 entries compared to 2 entries.

gcc/testsuite/ChangeLog:

* c-c++-common/hwasan/alloca-outside-caught.c: Update dg-output.
* c-c++-common/hwasan/heap-overflow.c: Likewise.
* c-c++-common/hwasan/hwasan-thread-access-parent.c: Likewise.
* c-c++-common/hwasan/large-aligned-1.c: Likewise.
* c-c++-common/hwasan/stack-tagging-basic-1.c: Likewise.

gcc/testsuite/c-c++-common/hwasan/alloca-outside-caught.c
gcc/testsuite/c-c++-common/hwasan/heap-overflow.c
gcc/testsuite/c-c++-common/hwasan/hwasan-thread-access-parent.c
gcc/testsuite/c-c++-common/hwasan/large-aligned-1.c
gcc/testsuite/c-c++-common/hwasan/stack-tagging-basic-1.c

index 60d7a9a874f90e2c5c461a33f144dcb431dea838..6f3825bee7c4462ab924c07164f3966dd7b34e6f 100644 (file)
@@ -20,6 +20,6 @@ main ()
 }
 
 /* { dg-output "HWAddressSanitizer: tag-mismatch on address 0x\[0-9a-f\]*.*" } */
-/* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/00 \\(ptr/mem\\) in thread T0.*" } */
+/* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/00.* \\(ptr/mem\\) in thread T0.*" } */
 /* { dg-output "Address 0x\[0-9a-f\]* is located in stack of thread T0.*" } */
 /* { dg-output "SUMMARY: HWAddressSanitizer: tag-mismatch \[^\n\]*.*" } */
index 137466800de6be972f68fccc6a5aee4481cab892..bddb38c81f10628eaa934666978187484ba679ff 100644 (file)
@@ -23,7 +23,7 @@ int main(int argc, char **argv) {
 }
 
 /* { dg-output "HWAddressSanitizer: tag-mismatch on address 0x\[0-9a-f\]*.*" } */
-/* { dg-output "READ of size 1 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/\[\[:xdigit:\]\]\[\[:xdigit:\]\] \\(ptr/mem\\) in thread T0.*" } */
+/* { dg-output "READ of size 1 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/\[\[:xdigit:\]\]\[\[:xdigit:\]\].* \\(ptr/mem\\) in thread T0.*" } */
 /* { dg-output "located 0 bytes to the right of 10-byte region.*" } */
 /* { dg-output "allocated here:.*" } */
 /* { dg-output "#1 0x\[0-9a-f\]+ +in _*main \[^\n\r]*heap-overflow.c:18" } */
index 828909d3b3bc6ad98fdb243cb6a06e78bcff4280..eca27c8cd2c1520e061465c928affb7aeb02b0f3 100644 (file)
@@ -46,6 +46,6 @@ main (int argc, char **argv)
 }
 
 /* { dg-output "HWAddressSanitizer: tag-mismatch on address 0x\[0-9a-f\]*.*" } */
-/* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: 00/\[\[:xdigit:\]\]\[\[:xdigit:\]\] \\(ptr/mem\\) in thread T1.*" } */
+/* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: 00/\[\[:xdigit:\]\]\[\[:xdigit:\]\].* \\(ptr/mem\\) in thread T1.*" } */
 /* { dg-output "Address 0x\[0-9a-f\]* is located in stack of thread T0.*" } */
 /* { dg-output "SUMMARY: HWAddressSanitizer: tag-mismatch \[^\n\]*.*" } */
index 1aa130323960225c2201067d29f83231f1cec5d7..6158ba4bdbcb1f8c7f8614cfadc46b51e2cb85b8 100644 (file)
@@ -9,6 +9,6 @@
 /* { dg-output "HWAddressSanitizer: tag-mismatch on address 0x\[0-9a-f\]*.*" } */
 /* NOTE: This assumes the current tagging mechanism (one at a time from the
    base and large aligned variables being handled first).  */
-/* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/\[\[:xdigit:\]\]\[\[:xdigit:\]\] \\(ptr/mem\\) in thread T0.*" } */
+/* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/\[\[:xdigit:\]\]\[\[:xdigit:\]\].* \\(ptr/mem\\) in thread T0.*" } */
 /* { dg-output "Address 0x\[0-9a-f\]* is located in stack of thread T0.*" } */
 /* { dg-output "SUMMARY: HWAddressSanitizer: tag-mismatch \[^\n\]*.*" } */
index 90d5837254f8dddadfc2235fe5e7191c45e7887b..c4e698e1b8bafe7ab34f123431f216d749a6b195 100644 (file)
@@ -13,6 +13,6 @@
 #undef ARG
 
 /* { dg-output "HWAddressSanitizer: tag-mismatch on address 0x\[0-9a-f\]*.*" } */
-/* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/\[\[:xdigit:\]\]\[\[:xdigit:\]\] \\(ptr/mem\\) in thread T0.*" } */
+/* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/\[\[:xdigit:\]\]\[\[:xdigit:\]\].* \\(ptr/mem\\) in thread T0.*" } */
 /* { dg-output "Address 0x\[0-9a-f\]* is located in stack of thread T0.*" } */
 /* { dg-output "SUMMARY: HWAddressSanitizer: tag-mismatch \[^\n\]*.*" } */