[compiler-rt] bb4f7b9 - [compiler-rt][hwasan] Update register-dump-read.c test

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 21 05:44:02 PDT 2021


Author: David Spickett
Date: 2021-07-21T12:43:07Z
New Revision: bb4f7b916661d2517fb8dfadfc8629e6bed56ce4

URL: https://github.com/llvm/llvm-project/commit/bb4f7b916661d2517fb8dfadfc8629e6bed56ce4
DIFF: https://github.com/llvm/llvm-project/commit/bb4f7b916661d2517fb8dfadfc8629e6bed56ce4.diff

LOG: [compiler-rt][hwasan] Update register-dump-read.c test

Since d564cfb53c71dbbbd46b6719f5fe53d70313de45 moved
__hwasan_tag_mismatch4 this test has been reporting
a frame 0 of __hwasan_tag_mismatch_v2.

This failure can be seen on our bots:
https://lab.llvm.org/buildbot/#/builders/185/builds/170

Before the change:
 #0 0xaaaaba100e40 in main <...>/register-dump-read.c:21:10
After the change:
 #0 0xaaaab8494bec in __hwasan_tag_mismatch_v2 <...>/hwasan/hwasan_tag_mismatch_aarch64.S:147
 #1 0xaaaab84b4df8 in main <..>/register-dump-read.c:14:10

Update the test to check for a main frame as either frame
0 or frame 1.

Added: 
    

Modified: 
    compiler-rt/test/hwasan/TestCases/register-dump-read.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/hwasan/TestCases/register-dump-read.c b/compiler-rt/test/hwasan/TestCases/register-dump-read.c
index 17a340a94b425..bfc4b465d5e25 100644
--- a/compiler-rt/test/hwasan/TestCases/register-dump-read.c
+++ b/compiler-rt/test/hwasan/TestCases/register-dump-read.c
@@ -21,7 +21,8 @@ int main() {
   return x[16];
 
   // CHECK: ERROR: HWAddressSanitizer:
-  // CHECK: #0 {{.*}} in main {{.*}}register-dump-read.c:[[@LINE-3]]
+  // First frame might be __hwasan_tag_mismatch<...> so main could be frame 0 or 1.
+  // CHECK: #{{(0|1) .*}} in main {{.*}}register-dump-read.c:[[@LINE-4]]
 
   // Developer note: FileCheck really doesn't like when you have a regex that
   // ends with a '}' character, e.g. the regex "[0-9]{10}" will fail, because


        


More information about the llvm-commits mailing list