Index: compiler-rt/trunk/test/cfi/anon-namespace.cpp =================================================================== --- compiler-rt/trunk/test/cfi/anon-namespace.cpp +++ compiler-rt/trunk/test/cfi/anon-namespace.cpp @@ -1,32 +1,32 @@ // RUN: %clangxx_cfi -c -DTU1 -o %t1.o %s // RUN: %clangxx_cfi -c -DTU2 -o %t2.o %S/../cfi/anon-namespace.cpp // RUN: %clangxx_cfi -o %t1 %t1.o %t2.o -// RUN: %expect_crash %t1 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -c -DTU1 -DB32 -o %t1.o %s // RUN: %clangxx_cfi -c -DTU2 -DB32 -o %t2.o %S/../cfi/anon-namespace.cpp // RUN: %clangxx_cfi -o %t2 %t1.o %t2.o -// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -c -DTU1 -DB64 -o %t1.o %s // RUN: %clangxx_cfi -c -DTU2 -DB64 -o %t2.o %S/../cfi/anon-namespace.cpp // RUN: %clangxx_cfi -o %t3 %t1.o %t2.o -// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -c -DTU1 -DBM -o %t1.o %s // RUN: %clangxx_cfi -c -DTU2 -DBM -o %t2.o %S/../cfi/anon-namespace.cpp // RUN: %clangxx_cfi -o %t4 %t1.o %t2.o -// RUN: %expect_crash %t4 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx -c -DTU1 -o %t1.o %s // RUN: %clangxx -c -DTU2 -o %t2.o %S/../cfi/anon-namespace.cpp // RUN: %clangxx -o %t5 %t1.o %t2.o -// RUN: %t5 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t5 2>&1 | FileCheck --check-prefix=NCFI %s // RUN: %clangxx_cfi_diag -c -DTU1 -o %t1.o %s // RUN: %clangxx_cfi_diag -c -DTU2 -o %t2.o %S/../cfi/anon-namespace.cpp // RUN: %clangxx_cfi_diag -o %t6 %t1.o %t2.o -// RUN: %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG %s +// RUN: %run %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG %s // Tests that the CFI mechanism treats classes in the anonymous namespace in // different translation units as having distinct identities. This is done by Index: compiler-rt/trunk/test/cfi/bad-cast.cpp =================================================================== --- compiler-rt/trunk/test/cfi/bad-cast.cpp +++ compiler-rt/trunk/test/cfi/bad-cast.cpp @@ -1,68 +1,68 @@ // RUN: %clangxx_cfi -o %t1 %s -// RUN: %expect_crash %t1 a 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t1 b 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t1 c 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %t1 d 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t1 e 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t1 f 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %expect_crash %t1 g 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %t1 h 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %expect_crash %run %t1 a 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t1 b 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t1 c 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %run %t1 d 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t1 e 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t1 f 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %expect_crash %run %t1 g 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %run %t1 h 2>&1 | FileCheck --check-prefix=PASS %s // RUN: %clangxx_cfi -DB32 -o %t2 %s -// RUN: %expect_crash %t2 a 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t2 b 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t2 c 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %t2 d 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t2 e 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t2 f 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %expect_crash %t2 g 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %t2 h 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %expect_crash %run %t2 a 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t2 b 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t2 c 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %run %t2 d 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t2 e 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t2 f 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %expect_crash %run %t2 g 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %run %t2 h 2>&1 | FileCheck --check-prefix=PASS %s // RUN: %clangxx_cfi -DB64 -o %t3 %s -// RUN: %expect_crash %t3 a 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t3 b 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t3 c 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %t3 d 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t3 e 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t3 f 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %expect_crash %t3 g 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %t3 h 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %expect_crash %run %t3 a 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t3 b 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t3 c 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %run %t3 d 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t3 e 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t3 f 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %expect_crash %run %t3 g 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %run %t3 h 2>&1 | FileCheck --check-prefix=PASS %s // RUN: %clangxx_cfi -DBM -o %t4 %s -// RUN: %expect_crash %t4 a 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t4 b 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t4 c 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %t4 d 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t4 e 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t4 f 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %expect_crash %t4 g 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %t4 h 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %expect_crash %run %t4 a 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t4 b 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t4 c 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %run %t4 d 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t4 e 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t4 f 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %expect_crash %run %t4 g 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %run %t4 h 2>&1 | FileCheck --check-prefix=PASS %s // RUN: %clangxx_cfi -fsanitize=cfi-cast-strict -o %t5 %s -// RUN: %expect_crash %t5 a 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t5 b 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t5 c 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t5 d 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t5 e 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t5 f 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t5 g 2>&1 | FileCheck --check-prefix=FAIL %s -// RUN: %expect_crash %t5 h 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t5 a 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t5 b 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t5 c 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t5 d 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t5 e 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t5 f 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t5 g 2>&1 | FileCheck --check-prefix=FAIL %s +// RUN: %expect_crash %run %t5 h 2>&1 | FileCheck --check-prefix=FAIL %s // RUN: %clangxx -o %t6 %s -// RUN: %t6 a 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t6 b 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t6 c 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t6 d 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t6 e 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t6 f 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t6 g 2>&1 | FileCheck --check-prefix=PASS %s -// RUN: %t6 h 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t6 a 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t6 b 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t6 c 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t6 d 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t6 e 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t6 f 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t6 g 2>&1 | FileCheck --check-prefix=PASS %s +// RUN: %run %t6 h 2>&1 | FileCheck --check-prefix=PASS %s // RUN: %clangxx_cfi_diag -o %t7 %s -// RUN: %t7 a 2>&1 | FileCheck --check-prefix=CFI-DIAG-D %s -// RUN: %t7 b 2>&1 | FileCheck --check-prefix=CFI-DIAG-D %s -// RUN: %t7 c 2>&1 | FileCheck --check-prefix=CFI-DIAG-D %s -// RUN: %t7 g 2>&1 | FileCheck --check-prefix=CFI-DIAG-U %s +// RUN: %run %t7 a 2>&1 | FileCheck --check-prefix=CFI-DIAG-D %s +// RUN: %run %t7 b 2>&1 | FileCheck --check-prefix=CFI-DIAG-D %s +// RUN: %run %t7 c 2>&1 | FileCheck --check-prefix=CFI-DIAG-D %s +// RUN: %run %t7 g 2>&1 | FileCheck --check-prefix=CFI-DIAG-U %s // Tests that the CFI enforcement detects bad casts. Index: compiler-rt/trunk/test/cfi/bad-split.cpp =================================================================== --- compiler-rt/trunk/test/cfi/bad-split.cpp +++ compiler-rt/trunk/test/cfi/bad-split.cpp @@ -1,5 +1,5 @@ // GlobalSplit used to lose type metadata for classes with virtual bases but no virtual methods. -// RUN: %clangxx_cfi -o %t1 %s && %t1 +// RUN: %clangxx_cfi -o %t1 %s && %run %t1 // UNSUPPORTED: win32 Index: compiler-rt/trunk/test/cfi/base-derived-destructor.cpp =================================================================== --- compiler-rt/trunk/test/cfi/base-derived-destructor.cpp +++ compiler-rt/trunk/test/cfi/base-derived-destructor.cpp @@ -1,56 +1,56 @@ // RUN: %clangxx_cfi -o %t1 %s -// RUN: %expect_crash %t1 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB32 -o %t2 %s -// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB64 -o %t3 %s -// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DBM -o %t4 %s -// RUN: %expect_crash %t4 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O1 -o %t5 %s -// RUN: %expect_crash %t5 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t5 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O1 -DB32 -o %t6 %s -// RUN: %expect_crash %t6 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t6 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O1 -DB64 -o %t7 %s -// RUN: %expect_crash %t7 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t7 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O1 -DBM -o %t8 %s -// RUN: %expect_crash %t8 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t8 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O2 -o %t9 %s -// RUN: %expect_crash %t9 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t9 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O2 -DB32 -o %t10 %s -// RUN: %expect_crash %t10 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t10 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O2 -DB64 -o %t11 %s -// RUN: %expect_crash %t11 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t11 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O2 -DBM -o %t12 %s -// RUN: %expect_crash %t12 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t12 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O3 -o %t13 %s -// RUN: %expect_crash %t13 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t13 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O3 -DB32 -o %t14 %s -// RUN: %expect_crash %t14 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t14 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O3 -DB64 -o %t15 %s -// RUN: %expect_crash %t15 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t15 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O3 -DBM -o %t16 %s -// RUN: %expect_crash %t16 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t16 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi_diag -o %t17 %s -// RUN: %t17 2>&1 | FileCheck --check-prefix=CFI-DIAG %s +// RUN: %run %t17 2>&1 | FileCheck --check-prefix=CFI-DIAG %s // RUN: %clangxx -o %t18 %s -// RUN: %t18 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t18 2>&1 | FileCheck --check-prefix=NCFI %s // Tests that the CFI mechanism crashes the program when making a // base-to-derived cast from a destructor of the base class, Index: compiler-rt/trunk/test/cfi/multiple-inheritance.cpp =================================================================== --- compiler-rt/trunk/test/cfi/multiple-inheritance.cpp +++ compiler-rt/trunk/test/cfi/multiple-inheritance.cpp @@ -1,26 +1,26 @@ // RUN: %clangxx_cfi -o %t1 %s -// RUN: %expect_crash %t1 2>&1 | FileCheck --check-prefix=CFI %s -// RUN: %expect_crash %t1 x 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t1 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t1 x 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB32 -o %t2 %s -// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s -// RUN: %expect_crash %t2 x 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 x 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB64 -o %t3 %s -// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s -// RUN: %expect_crash %t3 x 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 x 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DBM -o %t4 %s -// RUN: %expect_crash %t4 2>&1 | FileCheck --check-prefix=CFI %s -// RUN: %expect_crash %t4 x 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 x 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx -o %t5 %s -// RUN: %t5 2>&1 | FileCheck --check-prefix=NCFI %s -// RUN: %t5 x 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t5 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t5 x 2>&1 | FileCheck --check-prefix=NCFI %s // RUN: %clangxx_cfi_diag -o %t6 %s -// RUN: %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG2 %s -// RUN: %t6 x 2>&1 | FileCheck --check-prefix=CFI-DIAG1 %s +// RUN: %run %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG2 %s +// RUN: %run %t6 x 2>&1 | FileCheck --check-prefix=CFI-DIAG1 %s // Tests that the CFI mechanism is sensitive to multiple inheritance and only // permits calls via virtual tables for the correct base class. Index: compiler-rt/trunk/test/cfi/nvcall.cpp =================================================================== --- compiler-rt/trunk/test/cfi/nvcall.cpp +++ compiler-rt/trunk/test/cfi/nvcall.cpp @@ -1,20 +1,20 @@ // RUN: %clangxx_cfi -o %t1 %s -// RUN: %expect_crash %t1 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB32 -o %t2 %s -// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB64 -o %t3 %s -// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DBM -o %t4 %s -// RUN: %expect_crash %t4 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx -o %t5 %s -// RUN: %t5 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t5 2>&1 | FileCheck --check-prefix=NCFI %s // RUN: %clangxx_cfi_diag -o %t6 %s -// RUN: %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG %s +// RUN: %run %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG %s // Tests that the CFI mechanism crashes the program when making a non-virtual // call to an object of the wrong class, by casting a pointer to such an object Index: compiler-rt/trunk/test/cfi/overwrite.cpp =================================================================== --- compiler-rt/trunk/test/cfi/overwrite.cpp +++ compiler-rt/trunk/test/cfi/overwrite.cpp @@ -1,20 +1,20 @@ // RUN: %clangxx_cfi -o %t1 %s -// RUN: %expect_crash_unless_devirt %t1 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash_unless_devirt %run %t1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB32 -o %t2 %s -// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB64 -o %t3 %s -// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DBM -o %t4 %s -// RUN: %expect_crash %t4 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx -o %t5 %s -// RUN: %t5 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t5 2>&1 | FileCheck --check-prefix=NCFI %s // RUN: %clangxx_cfi_diag -o %t6 %s -// RUN: %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG %s +// RUN: %run %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG %s // Tests that the CFI mechanism crashes the program when a virtual table is // replaced with a compatible table of function pointers that does not belong to Index: compiler-rt/trunk/test/cfi/sibling.cpp =================================================================== --- compiler-rt/trunk/test/cfi/sibling.cpp +++ compiler-rt/trunk/test/cfi/sibling.cpp @@ -1,19 +1,19 @@ // XFAIL: * // RUN: %clangxx_cfi -o %t1 %s -// RUN: %expect_crash %t1 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB32 -o %t2 %s -// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB64 -o %t3 %s -// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DBM -o %t4 %s -// RUN: %expect_crash %t4 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx -o %t5 %s -// RUN: %t5 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t5 2>&1 | FileCheck --check-prefix=NCFI %s // Tests that the CFI enforcement distinguishes between non-overriding siblings. // XFAILed as not implemented yet. Index: compiler-rt/trunk/test/cfi/simple-fail.cpp =================================================================== --- compiler-rt/trunk/test/cfi/simple-fail.cpp +++ compiler-rt/trunk/test/cfi/simple-fail.cpp @@ -1,59 +1,59 @@ // RUN: %clangxx_cfi -o %t1 %s -// RUN: %expect_crash %t1 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB32 -o %t2 %s -// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB64 -o %t3 %s -// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DBM -o %t4 %s -// RUN: %expect_crash %t4 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O1 -o %t5 %s -// RUN: %expect_crash %t5 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t5 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O1 -DB32 -o %t6 %s -// RUN: %expect_crash %t6 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t6 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O1 -DB64 -o %t7 %s -// RUN: %expect_crash %t7 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t7 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O1 -DBM -o %t8 %s -// RUN: %expect_crash %t8 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t8 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O2 -o %t9 %s -// RUN: %expect_crash %t9 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t9 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O2 -DB32 -o %t10 %s -// RUN: %expect_crash %t10 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t10 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O2 -DB64 -o %t11 %s -// RUN: %expect_crash %t11 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t11 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O2 -DBM -o %t12 %s -// RUN: %expect_crash %t12 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t12 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O3 -o %t13 %s -// RUN: %expect_crash %t13 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t13 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O3 -DB32 -o %t14 %s -// RUN: %expect_crash %t14 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t14 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O3 -DB64 -o %t15 %s -// RUN: %expect_crash %t15 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t15 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -O3 -DBM -o %t16 %s -// RUN: %expect_crash %t16 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t16 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi_diag -o %t17 %s -// RUN: %t17 2>&1 | FileCheck --check-prefix=CFI-DIAG %s +// RUN: %run %t17 2>&1 | FileCheck --check-prefix=CFI-DIAG %s // RUN: %clangxx -o %t18 %s -// RUN: %t18 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t18 2>&1 | FileCheck --check-prefix=NCFI %s // RUN: %clangxx_cfi -DCHECK_NO_SANITIZE_CFI -o %t19 %s -// RUN: %t19 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t19 2>&1 | FileCheck --check-prefix=NCFI %s // Tests that the CFI mechanism crashes the program when making a virtual call // to an object of the wrong class but with a compatible vtable, by casting a Index: compiler-rt/trunk/test/cfi/simple-pass.cpp =================================================================== --- compiler-rt/trunk/test/cfi/simple-pass.cpp +++ compiler-rt/trunk/test/cfi/simple-pass.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx_cfi -o %t %s -// RUN: %t +// RUN: %run %t // Tests that the CFI mechanism does not crash the program when making various // kinds of valid calls involving classes with various different linkages and Index: compiler-rt/trunk/test/cfi/stats.cpp =================================================================== --- compiler-rt/trunk/test/cfi/stats.cpp +++ compiler-rt/trunk/test/cfi/stats.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx_cfi -g -fsanitize-stats -o %t %s -// RUN: env SANITIZER_STATS_PATH=%t.stats %t +// RUN: env SANITIZER_STATS_PATH=%t.stats %run %t // RUN: sanstats %t.stats | FileCheck %s // FIXME: We currently emit the wrong debug info under devirtualization. Index: compiler-rt/trunk/test/cfi/target_uninstrumented.cpp =================================================================== --- compiler-rt/trunk/test/cfi/target_uninstrumented.cpp +++ compiler-rt/trunk/test/cfi/target_uninstrumented.cpp @@ -1,6 +1,6 @@ // RUN: %clangxx -g -DSHARED_LIB %s -fPIC -shared -o %T/target_uninstrumented-so.so // RUN: %clangxx_cfi_diag -g %s -o %t %T/target_uninstrumented-so.so -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s // REQUIRES: cxxabi // UNSUPPORTED: win32 Index: compiler-rt/trunk/test/cfi/two-vcalls.cpp =================================================================== --- compiler-rt/trunk/test/cfi/two-vcalls.cpp +++ compiler-rt/trunk/test/cfi/two-vcalls.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx_cfi_diag -o %t %s -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s // This test checks that we don't generate two type checks, // if two virtual calls are in the same function. Index: compiler-rt/trunk/test/cfi/vdtor.cpp =================================================================== --- compiler-rt/trunk/test/cfi/vdtor.cpp +++ compiler-rt/trunk/test/cfi/vdtor.cpp @@ -1,20 +1,20 @@ // RUN: %clangxx_cfi -o %t1 %s -// RUN: %expect_crash %t1 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB32 -o %t2 %s -// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DB64 -o %t3 %s -// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx_cfi -DBM -o %t4 %s -// RUN: %expect_crash %t4 2>&1 | FileCheck --check-prefix=CFI %s +// RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %clangxx -o %t5 %s -// RUN: %t5 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %run %t5 2>&1 | FileCheck --check-prefix=NCFI %s // RUN: %clangxx_cfi_diag -o %t6 %s -// RUN: %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG %s +// RUN: %run %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG %s // Tests that the CFI enforcement also applies to virtual destructor calls made // via 'delete'.