summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Posix
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2018-03-27 00:31:16 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2018-03-27 00:31:16 +0000
commit4637a721ec1e9399c884a941d71d966bd0c1af74 (patch)
treeaeb12f27d0f5bff3e63ce1deb72526237a129c7f /test/asan/TestCases/Posix
parentd7962b9d3455e69f0fd558d6226d9c70d711740e (diff)
downloadcompiler-rt-4637a721ec1e9399c884a941d71d966bd0c1af74.tar.gz
Revert "[asan] Replace vfork with fork."
Replacing vfork with fork results in significant slowdown of certain apps (in particular, memcached). This reverts r327752. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/Posix')
-rw-r--r--test/asan/TestCases/Posix/vfork.cc30
1 files changed, 0 insertions, 30 deletions
diff --git a/test/asan/TestCases/Posix/vfork.cc b/test/asan/TestCases/Posix/vfork.cc
deleted file mode 100644
index 5fcb11f53..000000000
--- a/test/asan/TestCases/Posix/vfork.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Test that vfork() is fork().
-// https://github.com/google/sanitizers/issues/925
-
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1
-
-#include <assert.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-int volatile global;
-
-int main(int argc, char **argv) {
- pid_t pid = vfork();
- if (pid) {
- // parent
- int status;
- int res;
- do {
- res = waitpid(pid, &status, 0);
- } while (res >= 0 && !WIFEXITED(status) && !WIFSIGNALED(status));
- assert(global == 0);
- } else {
- // child
- global = 42;
- _exit(0);
- }
-
- return 0;
-}