diff --git a/llvm/utils/unittest/googletest/src/gtest-death-test.cc b/llvm/utils/unittest/googletest/src/gtest-death-test.cc --- a/llvm/utils/unittest/googletest/src/gtest-death-test.cc +++ b/llvm/utils/unittest/googletest/src/gtest-death-test.cc @@ -1070,7 +1070,7 @@ if (!use_fork) { static const bool stack_grows_down = StackGrowsDown(); - const size_t stack_size = getpagesize(); + const size_t stack_size = getpagesize() * 2; // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);