diff options
Diffstat (limited to 'test/sanitizer_common/TestCases/Linux/deepbind.cc')
-rw-r--r-- | test/sanitizer_common/TestCases/Linux/deepbind.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/deepbind.cc b/test/sanitizer_common/TestCases/Linux/deepbind.cc new file mode 100644 index 0000000000000..fc810ad039f47 --- /dev/null +++ b/test/sanitizer_common/TestCases/Linux/deepbind.cc @@ -0,0 +1,12 @@ +// RUN: %clangxx %s -o %t && %run not %t 1 2>&1 | FileCheck %s +// UNSUPPORTED: lsan, android + +#include <dlfcn.h> +#include <stdio.h> +#include <string> + +int main (int argc, char *argv[]) { + // CHECK: You are trying to dlopen a <arbitrary path> shared library with RTLD_DEEPBIND flag + void *lib = dlopen("<arbitrary path>", RTLD_NOW | RTLD_DEEPBIND); + return 0; +} |