1 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib3.so
2 // RUN: %clangxx_tsan -O1 %s -o %t
3 // RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" not %run %t 2>&1 | FileCheck %s
5 // Tests that unloading of a library matched against called_from_lib suppression
6 // causes program crash (this is not supported).
17 int main(int argc
, char **argv
) {
18 std::string lib
= std::string(dirname(argv
[0])) + "/libignore_lib3.so";
19 void *h
= dlopen(lib
.c_str(), RTLD_GLOBAL
| RTLD_NOW
);
21 fprintf(stderr
, "OK\n");
26 extern "C" void libfunc() {
31 // CHECK: ThreadSanitizer: library {{.*}} that was matched against called_from_lib suppression 'ignore_lib3.so' is unloaded