diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-02-14 13:02:58 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-02-14 13:02:58 +0000 |
commit | 5811f0e1e955866b76b0d9ebeccd2e4755c1dac8 (patch) | |
tree | 399a8d23e1b6d907d939583bf1fa2bd6fa1c5b79 /test/msan/dlerror.cc | |
parent | 3693bfe278d42da3891257b86c541e85fa9dec73 (diff) |
Move MSan lit-tests under test/msan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/msan/dlerror.cc')
-rw-r--r-- | test/msan/dlerror.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/msan/dlerror.cc b/test/msan/dlerror.cc new file mode 100644 index 000000000..281b3164f --- /dev/null +++ b/test/msan/dlerror.cc @@ -0,0 +1,14 @@ +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t + +#include <assert.h> +#include <dlfcn.h> +#include <stdio.h> +#include <string.h> + +int main(void) { + void *p = dlopen("/bad/file/name", RTLD_NOW); + assert(!p); + char *s = dlerror(); + printf("%s, %zu\n", s, strlen(s)); + return 0; +} |