diff options
Diffstat (limited to 'compiler-rt/test/msan/dlerror.cpp')
| -rw-r--r-- | compiler-rt/test/msan/dlerror.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler-rt/test/msan/dlerror.cpp b/compiler-rt/test/msan/dlerror.cpp new file mode 100644 index 00000000000..d5510b65c4a --- /dev/null +++ b/compiler-rt/test/msan/dlerror.cpp @@ -0,0 +1,14 @@ +// RUN: %clangxx_msan -O0 %s -o %t && %run %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; +} |

