summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2015-01-06 10:01:15 +0000
committerJay Foad <jay.foad@gmail.com>2015-01-06 10:01:15 +0000
commit2e459f8709e1759f9e30223bd890f5e26cf8b9cb (patch)
tree7c7792e15ae2430fc4f9f0ae7565216c991d3292
parent0dd5cceeb8e82c587b9a8fae00f515013ce0bfa1 (diff)
downloadcompiler-rt-2e459f8709e1759f9e30223bd890f5e26cf8b9cb.tar.gz
[asan] Bump the self-imposed stack limit from 128k to 256k. PowerPC64
Linux has 64k pages, so the old limit was only two pages. With ASLR the initial sp might be right at the start of the second page, so the stack will immediately grow down into the first page; and if you use all pages of a limited stack then asan hits a kernel bug to do with how stack guard pages are reported in /proc/self/maps: http://lkml.iu.edu//hypermail/linux/kernel/1501.0/01025.html We should still fix the underlying problems, but in the mean time this patch makes the test work with 64k pages as well as it does with 4k pages. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225261 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/asan/TestCases/stack-overflow.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/asan/TestCases/stack-overflow.cc b/test/asan/TestCases/stack-overflow.cc
index 7542d56b6..d4bb74730 100644
--- a/test/asan/TestCases/stack-overflow.cc
+++ b/test/asan/TestCases/stack-overflow.cc
@@ -92,7 +92,7 @@ void LimitStackAndReexec(int argc, char **argv) {
int res = getrlimit(RLIMIT_STACK, &rlim);
assert(res == 0);
if (rlim.rlim_cur == RLIM_INFINITY) {
- rlim.rlim_cur = 128 * 1024;
+ rlim.rlim_cur = 256 * 1024;
res = setrlimit(RLIMIT_STACK, &rlim);
assert(res == 0);