Pirama Arumuga Nainar | 7c91505 | 2015-04-08 08:58:29 -0700 | [diff] [blame] | 1 | // RUN: %clangxx_msan -O0 %s -o %t && %run %t |
Pirama Arumuga Nainar | 799172d | 2016-03-03 15:50:30 -0800 | [diff] [blame^] | 2 | // |
| 3 | // AArch64 shows fails with uninitialized bytes in __interceptor_strcmp from |
| 4 | // dlfcn/dlerror.c:107 (glibc). |
| 5 | // XFAIL: aarch64 |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 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 | } |