4 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -shared -o %t-dir/libignore_lib4.so
5 // RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable
6 // RUN: echo "called_from_lib:libignore_lib4.so" > %t-dir/executable.supp
7 // RUN: %env_tsan_opts=suppressions='%t-dir/executable.supp' %run %t-dir/executable 2>&1 | FileCheck %s
9 // powerpc64 big endian bots failed with "FileCheck error: '-' is empty" due
10 // to a segmentation fault.
11 // UNSUPPORTED: target=powerpc64-unknown-linux-gnu{{.*}}
12 // aarch64 bots failed with "called_from_lib suppression 'libignore_lib4.so'
13 // is matched against 2 libraries".
14 // UNSUPPORTED: target=aarch64{{.*}}
16 // Test longjmp in ignored lib.
17 // It used to crash since we jumped out of ScopedInterceptor scope.
28 extern "C" void myfunc() {
29 for (int i
= 0; i
< (1 << 20); i
++) {
38 int main(int argc
, char **argv
) {
39 std::string lib
= std::string(dirname(argv
[0])) + "/libignore_lib4.so";
40 void *h
= dlopen(lib
.c_str(), RTLD_GLOBAL
| RTLD_NOW
);
41 void (*func
)() = (void(*)())dlsym(h
, "myfunc");
43 fprintf(stderr
, "DONE\n");