brintos

brintos / llvm-project-archived public Read only

0
0
Text · 515 B · 5081b77 Raw
18 lines · cpp
1// Test that dlopen of dynamic runtime is prohibited.2//3// RUN: %clangxx %s -DRT=\"%shared_libasan\" -o %t -ldl4// RUN: not %run %t 2>&1 | FileCheck %s5// RUN: %env_asan_opts=verify_asan_link_order=true not %run %t 2>&1 | FileCheck %s6// RUN: %env_asan_opts=verify_asan_link_order=false %run %t 2>&17// REQUIRES: asan-dynamic-runtime8// XFAIL: android9 10#include <dlfcn.h>11 12int main(int argc, char **argv) {13  dlopen(RT, RTLD_LAZY);14  return 0;15}16 17// CHECK: ASan runtime does not come first in initial library list18