[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / compiler-rt / test / msan / dlopen_executable.cpp
blob393e871f5dce02c1bfbdcacc587dc5d9b9f7bad1
1 // RUN: %clangxx_msan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
3 #include <assert.h>
4 #include <dlfcn.h>
5 #include <stdlib.h>
7 static int my_global;
9 int main(void) {
10 int *uninit = (int*)malloc(sizeof(int));
11 my_global = *uninit;
12 void *p = dlopen(0, RTLD_NOW);
13 assert(p && "failed to get handle to executable");
14 return my_global;
15 // CHECK: MemorySanitizer: use-of-uninitialized-value
16 // CHECK: #0 {{.*}} in main{{.*}}dlopen_executable.cpp:[[@LINE-2]]