]> git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/msan/dlerror.cc
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / test / msan / dlerror.cc
1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t
2 //
3 // AArch64 shows fails with uninitialized bytes in __interceptor_strcmp from
4 // dlfcn/dlerror.c:107 (glibc).
5 // XFAIL: aarch64
6
7 #include <assert.h>
8 #include <dlfcn.h>
9 #include <stdio.h>
10 #include <string.h>
11
12 int main(void) {
13 void *p = dlopen("/bad/file/name", RTLD_NOW);
14 assert(!p);
15 char *s = dlerror();
16 printf("%s, %zu\n", s, strlen(s));
17 return 0;
18 }