]> git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Linux/asan_dlopen_test.cc
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / test / asan / TestCases / Linux / asan_dlopen_test.cc
1 // Test that dlopen of dynamic runtime is prohibited.
2 //
3 // RUN: %clangxx %s -DRT=\"%shared_libasan\" -o %t -ldl
4 // RUN: not %run %t 2>&1 | FileCheck %s
5 // REQUIRES: asan-dynamic-runtime
6 // XFAIL: android
7
8 #include <dlfcn.h>
9
10 int main(int argc, char **argv) {
11 dlopen(RT, RTLD_LAZY);
12 return 0;
13 }
14
15 // CHECK: ASan runtime does not come first in initial library list