diff options
Diffstat (limited to 'test/msan/Linux')
| -rw-r--r-- | test/msan/Linux/reexec_unlimited_stack.cc | 23 | ||||
| -rw-r--r-- | test/msan/Linux/sunrpc.cc | 2 | ||||
| -rw-r--r-- | test/msan/Linux/sunrpc_bytes.cc | 2 | ||||
| -rw-r--r-- | test/msan/Linux/sunrpc_string.cc | 2 |
4 files changed, 29 insertions, 0 deletions
diff --git a/test/msan/Linux/reexec_unlimited_stack.cc b/test/msan/Linux/reexec_unlimited_stack.cc new file mode 100644 index 0000000000000..61492ec34533f --- /dev/null +++ b/test/msan/Linux/reexec_unlimited_stack.cc @@ -0,0 +1,23 @@ +// MSAN re-execs on unlimited stacks. We use that to verify ReExec() uses the +// right path. +// RUN: %clangxx_msan -O0 %s -o %t && ulimit -s unlimited && %run %t | FileCheck %s + +#include <stdio.h> + +#if !defined(__GLIBC_PREREQ) +#define __GLIBC_PREREQ(a, b) 0 +#endif + +#if __GLIBC_PREREQ(2, 16) +#include <sys/auxv.h> +#endif + +int main() { +#if __GLIBC_PREREQ(2, 16) + // Make sure AT_EXECFN didn't get overwritten by re-exec. + puts(reinterpret_cast<const char *>(getauxval(AT_EXECFN))); +#else + puts("No getauxval"); +#endif + // CHECK-NOT: /proc/self/exe +} diff --git a/test/msan/Linux/sunrpc.cc b/test/msan/Linux/sunrpc.cc index c92ad632c0951..edf49c2a5cee6 100644 --- a/test/msan/Linux/sunrpc.cc +++ b/test/msan/Linux/sunrpc.cc @@ -1,3 +1,5 @@ +// REQUIRES: sunrpc + // RUN: %clangxx_msan -g -O0 -DTYPE=int -DFN=xdr_int %s -o %t && \ // RUN: %run %t 2>&1 // RUN: %clangxx_msan -g -O0 -DTYPE=int -DFN=xdr_int -DUNINIT=1 %s -o %t && \ diff --git a/test/msan/Linux/sunrpc_bytes.cc b/test/msan/Linux/sunrpc_bytes.cc index 477637af2b631..7eb47e1784928 100644 --- a/test/msan/Linux/sunrpc_bytes.cc +++ b/test/msan/Linux/sunrpc_bytes.cc @@ -1,3 +1,5 @@ +// REQUIRES: sunrpc + // RUN: %clangxx_msan -g -O0 %s -o %t && \ // RUN: %run %t 2>&1 // RUN: %clangxx_msan -g -O0 -DUNINIT=1 %s -o %t && \ diff --git a/test/msan/Linux/sunrpc_string.cc b/test/msan/Linux/sunrpc_string.cc index 350222f5cc1e8..723b855922619 100644 --- a/test/msan/Linux/sunrpc_string.cc +++ b/test/msan/Linux/sunrpc_string.cc @@ -1,3 +1,5 @@ +// REQUIRES: sunrpc + // RUN: %clangxx_msan -g -O0 %s -o %t && \ // RUN: %run %t 2>&1 // RUN: %clangxx_msan -g -O0 -DUNINIT=1 %s -o %t && \ |
