[PATCH] D111841: [hwasan] Fix TestCases/thread-uaf.c.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 14 15:03:35 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7a3fb71c3cbd: [hwasan] Fix TestCases/thread-uaf.c. (authored by eugenis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111841/new/

https://reviews.llvm.org/D111841

Files:
  compiler-rt/test/hwasan/TestCases/thread-uaf.c


Index: compiler-rt/test/hwasan/TestCases/thread-uaf.c
===================================================================
--- compiler-rt/test/hwasan/TestCases/thread-uaf.c
+++ compiler-rt/test/hwasan/TestCases/thread-uaf.c
@@ -1,6 +1,8 @@
 // Tests UAF detection where Allocate/Deallocate/Use
 // happen in separate threads.
-// RUN: %clang_hwasan %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_hwasan %s -o %t && not %run %t > %t.out 2>&1
+// RUN: cat %t.out | FileCheck %s
+// RUN: cat %t.out | FileCheck --check-prefix=CHECK-THREAD %s
 // REQUIRES: stable-runtime
 
 #include <pthread.h>
@@ -35,10 +37,10 @@
   // CHECK: in Deallocate
   // CHECK: previously allocated here:
   // CHECK: in Allocate
-  // CHECK-DAG: Thread: T2 0x
-  // CHECK-DAG: Thread: T3 0x
-  // CHECK-DAG: Thread: T0 0x
-  // CHECK-DAG: Thread: T1 0x
+  // CHECK-THREAD-DAG: Thread: T2 0x
+  // CHECK-THREAD-DAG: Thread: T3 0x
+  // CHECK-THREAD-DAG: Thread: T0 0x
+  // CHECK-THREAD-DAG: Thread: T1 0x
   __sync_fetch_and_add(&state, 1);
   return NULL;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111841.379857.patch
Type: text/x-patch
Size: 1048 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211014/6b0d8212/attachment-0001.bin>


More information about the llvm-commits mailing list