Skip to content

Commit 1d3c302

Browse files
Revert "[compiler-rt] Remove %T from shared object substitutions (#155302)"
This reverts commit 7691559. This took out at least three buildbots. Reverting until I can figure out what is going on.
1 parent e6ae4e6 commit 1d3c302

25 files changed

+20
-35
lines changed

compiler-rt/test/asan/TestCases/Linux/coverage-missing.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
// Test for "sancov.py missing ...".
22

33
// First case: coverage from executable. main() is called on every code path.
4-
// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
54
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t -DFOOBAR -DMAIN
6-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t
5+
// RUN: rm -rf %t-dir
6+
// RUN: mkdir -p %t-dir
7+
// RUN: cd %t-dir
8+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t
79
// RUN: %sancov print *.sancov > main.txt
810
// RUN: rm *.sancov
911
// RUN: count 1 < main.txt
10-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t x
12+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x
1113
// RUN: %sancov print *.sancov > foo.txt
1214
// RUN: rm *.sancov
1315
// RUN: count 3 < foo.txt
14-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t x x
16+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x x
1517
// RUN: %sancov print *.sancov > bar.txt
1618
// RUN: rm *.sancov
1719
// RUN: count 4 < bar.txt
@@ -24,15 +26,18 @@
2426
// RUN: not grep "^<" %t.log
2527

2628
// Second case: coverage from DSO.
27-
// RUN: cd ..
28-
// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
29+
// cd %t-dir
2930
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %dynamiclib -DFOOBAR -shared -fPIC
3031
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %dynamiclib -o %t -DMAIN
31-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t x
32+
// RUN: cd ..
33+
// RUN: rm -rf %t-dir
34+
// RUN: mkdir -p %t-dir
35+
// RUN: cd %t-dir
36+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x
3237
// RUN: %sancov print %xdynamiclib_filename.*.sancov > foo.txt
3338
// RUN: rm *.sancov
3439
// RUN: count 2 < foo.txt
35-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t x x
40+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x x
3641
// RUN: %sancov print %xdynamiclib_filename.*.sancov > bar.txt
3742
// RUN: rm *.sancov
3843
// RUN: count 3 < bar.txt

compiler-rt/test/asan/TestCases/Linux/local_alias.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// false positive global-buffer-overflow due to sanitized library poisons
55
// globals from non-sanitized one.
66
//
7-
// RUN: mkdir -p %t.dir && cd %t.dir
87
// RUN: %clangxx_asan -DBUILD_INSTRUMENTED_DSO=1 -fPIC -shared -mllvm -asan-use-private-alias %s -o %dynamiclib1
98
// RUN: %clangxx -DBUILD_UNINSTRUMENTED_DSO=1 -fPIC -shared %s -o %dynamiclib2
109
// RUN: %clangxx %s -c -mllvm -asan-use-private-alias -o %t.o

compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// -fno-sanitize-address-use-odr-indicator turns off both.
1111
//
1212
// Different size: detect a bug if detect_odr_violation>=1
13-
// RUN: mkdir -p %t.dir && cd %t.dir
1413
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -fno-sanitize-address-use-odr-indicator %s -o %dynamiclib
1514
// RUN: %clangxx_asan -g -fno-sanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t-ODR-EXE
1615
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 not %run %t-ODR-EXE 2>&1 | FileCheck %s

compiler-rt/test/asan/TestCases/Linux/odr-vtable.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// REQUIRES: shared_cxxabi
55

66
/// Not using private alias or enabling ODR indicator can detect ODR issues.
7-
// RUN: mkdir -p %t.dir && cd %t.dir
87
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO1 -fPIC -shared -mllvm -asan-use-private-alias=0 %s -o %dynamiclib1
98
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO2 -fPIC -shared -mllvm -asan-use-private-alias=0 %s -o %dynamiclib2
109
// RUN: %clangxx_asan -fno-rtti %s %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t

compiler-rt/test/asan/TestCases/Linux/odr_c_test.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Test that we can properly report an ODR violation between an instrumented
22
// global and a non-instrumented global if not using private aliases.
33

4-
// RUN: mkdir -p %t.dir && cd %t.dir
54
// RUN: %clang_asan -fcommon %s -fPIC -shared -mllvm -asan-use-private-alias=0 -o %dynamiclib1 -DFILE1
65
// RUN: %clang_asan -fcommon %s -fPIC -shared -mllvm -asan-use-private-alias=0 -o %dynamiclib2 -DFILE2
76
// RUN: %clang_asan -fcommon %s -fPIE %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t

compiler-rt/test/asan/TestCases/Linux/preinit_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// RUN: mkdir -p %t.dir && cd %t.dir
21
// RUN: %clangxx -DFUNC=zzzz %s -shared -o %dynamiclib -fPIC
32
// RUN: %clangxx_asan -DFUNC=main %s -o %t %ld_flags_rpath_exe
43
// RUN: %run %t

compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Check that unloading a module doesn't break coverage dumping for remaining
22
// modules.
3-
// RUN: mkdir -p %t.dir && cd %t.dir
43
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib1 -fPIC
54
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib2 -fPIC
65
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %libdl -o %t.exe

compiler-rt/test/asan/TestCases/Posix/coverage-reset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
21
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
32
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t
3+
// RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir
44
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s
55
//
66
// UNSUPPORTED: ios

compiler-rt/test/asan/TestCases/Posix/coverage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN:rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
21
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
32
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t
3+
// RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir
44
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-main
55
// RUN: %sancov print coverage.*sancov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV1
66
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-foo
@@ -14,6 +14,7 @@
1414
// RUN: %sancov print merged-cov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV2
1515
// RUN: %env_asan_opts=coverage=1:verbosity=1 not %run %t foo bar 4 2>&1 | FileCheck %s --check-prefix=CHECK-report
1616
// RUN: %env_asan_opts=coverage=1:verbosity=1 not %run %t foo bar 4 5 2>&1 | FileCheck %s --check-prefix=CHECK-segv
17+
// RUN: cd .. && rm -rf %t-dir
1718
//
1819
// https://code.google.com/p/address-sanitizer/issues/detail?id=263
1920
// XFAIL: android

compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Check that memset() call from a shared library gets intercepted.
22

3-
// RUN: mkdir -p %t.dir && cd %t.dir
43
// RUN: %clangxx_asan -O0 %s -DSHARED_LIB \
54
// RUN: -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
65
// RUN: %clangxx_asan -O0 %s -o %t %ld_flags_rpath_exe && \

0 commit comments

Comments
 (0)