4 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib2_0.so
5 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib2_1.so
6 // RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable
7 // RUN: %env_tsan_opts=suppressions='%s.supp' %deflake %run %t-dir/executable | FileCheck %s
9 // Tests that called_from_lib suppression matched against 2 libraries
10 // causes program crash (this is not supported).
19 int main(int argc
, char **argv
) {
20 std::string lib0
= std::string(dirname(argv
[0])) + "/libignore_lib2_0.so";
21 std::string lib1
= std::string(dirname(argv
[0])) + "/libignore_lib2_1.so";
22 dlopen(lib0
.c_str(), RTLD_GLOBAL
| RTLD_NOW
);
23 dlopen(lib1
.c_str(), RTLD_GLOBAL
| RTLD_NOW
);
24 fprintf(stderr
, "OK\n");
29 extern "C" void libfunc() {
34 // CHECK: ThreadSanitizer: called_from_lib suppression 'ignore_lib2' is matched against 2 libraries