4 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib3.so
5 // RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable
6 // RUN: %env_tsan_opts=suppressions='%s.supp' %deflake %run %t-dir/executable | FileCheck %s
8 // Tests that unloading of a library matched against called_from_lib suppression
9 // causes program crash (this is not supported).
11 // Some aarch64 kernels do not support non executable write pages
12 // REQUIRES: stable-runtime
23 int main(int argc
, char **argv
) {
24 std::string lib
= std::string(dirname(argv
[0])) + "/libignore_lib3.so";
25 void *h
= dlopen(lib
.c_str(), RTLD_GLOBAL
| RTLD_NOW
);
27 fprintf(stderr
, "OK\n");
32 extern "C" void libfunc() {
37 // CHECK: ThreadSanitizer: library {{.*}} that was matched against called_from_lib suppression 'ignore_lib3.so' is unloaded