[LSAN] Increase stack space for guard-page.c test
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fri, 13 Dec 2019 19:44:13 +0000 (19:44 +0000)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fri, 13 Dec 2019 21:40:03 +0000 (21:40 +0000)
Summary:
When running the tests on a Ubuntu 18.04 machine this test is crashing for
me inside the runtime linker. My guess is that it is trying to save more
registers (possibly large vector ones) and the current stack space is not
sufficient.

Reviewers: samsonov, kcc, eugenis

Reviewed By: eugenis

Subscribers: eugenis, merge_guards_bot, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D71461

compiler-rt/test/lsan/TestCases/Linux/guard-page.c

index 25d63e2..7b353ce 100644 (file)
@@ -36,11 +36,11 @@ static void* thread(void* arg) {
 
   if (getcontext(&ctx) < 0)
     die("getcontext", 0);
-  stack = malloc(1 << 11);
+  stack = malloc(1 << 12);
   if (stack == NULL)
     die("malloc", 0);
   ctx.uc_stack.ss_sp = stack;
-  ctx.uc_stack.ss_size = 1 << 11;
+  ctx.uc_stack.ss_size = 1 << 12;
   makecontext(&ctx, ctxfunc, 0);
   setcontext(&ctx);
   die("setcontext", 0);