diff options
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; +} |