[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / msan / Linux / reexec_unlimited_stack.cpp
blob8dee27047470ea0e7f0c231df6c10b46a07d91ef
1 // MSAN re-execs on unlimited stacks. We use that to verify ReExec() uses the
2 // right path.
3 // REQUIRES: shell
4 // RUN: %clangxx_msan -O0 %s -o %t && ulimit -s unlimited && %run %t | FileCheck %s
6 #include <stdio.h>
8 #if !defined(__GLIBC_PREREQ)
9 #define __GLIBC_PREREQ(a, b) 0
10 #endif
12 #if __GLIBC_PREREQ(2, 16)
13 #include <sys/auxv.h>
14 #endif
16 int main() {
17 #if __GLIBC_PREREQ(2, 16)
18 // Make sure AT_EXECFN didn't get overwritten by re-exec.
19 puts(reinterpret_cast<const char *>(getauxval(AT_EXECFN)));
20 #else
21 puts("No getauxval");
22 #endif
23 // CHECK-NOT: /proc/self/exe