From ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 7 Jan 2015 19:55:37 +0000 Subject: Import compiler-rt trunk r224034. https://llvm.org/svn/llvm-project/compiler-rt/trunk@224034 --- test/msan/dlerror.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/msan/dlerror.cc (limited to 'test/msan/dlerror.cc') diff --git a/test/msan/dlerror.cc b/test/msan/dlerror.cc new file mode 100644 index 000000000000..2c726d36041e --- /dev/null +++ b/test/msan/dlerror.cc @@ -0,0 +1,14 @@ +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t + +#include +#include +#include +#include + +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; +} -- cgit v1.2.3