Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / Linux / asan_dlopen_test.cpp
blob5081b77532116fa71933f1d4ffc0fe473df1c186
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 // RUN: %env_asan_opts=verify_asan_link_order=true not %run %t 2>&1 | FileCheck %s
6 // RUN: %env_asan_opts=verify_asan_link_order=false %run %t 2>&1
7 // REQUIRES: asan-dynamic-runtime
8 // XFAIL: android
10 #include <dlfcn.h>
12 int main(int argc, char **argv) {
13 dlopen(RT, RTLD_LAZY);
14 return 0;
17 // CHECK: ASan runtime does not come first in initial library list