[compiler-rt] 6d051ae - [ASan] fix test broken by argument promotion pass

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 13:52:15 PDT 2023


Author: Florian Mayer
Date: 2023-04-14T13:52:06-07:00
New Revision: 6d051ae90dcad9b2d17f58764a5b9811d5b323c2

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

LOG: [ASan] fix test broken by argument promotion pass

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D148376

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
index b3dbfb6dc89de..2e27a16811ef6 100644
--- a/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
+++ b/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
@@ -9,7 +9,9 @@ int main() {
     f = [&x]() __attribute__((noinline)) {
       return x;  // BOOM
       // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-      // CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cpp:[[@LINE-2]]
+      // We cannot assert the line, after the argument promotion pass this crashes
+      // in the BOOM line below instead, when the ref gets turned into a value.
+      // CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cpp
     };
   }
   return f();  // BOOM


        


More information about the llvm-commits mailing list