[lsan] one more test fix to please the Debian Sid bot (this time, confirmed on the proper machine). Apparently, newer glibc uses slightly more stack

llvm-svn: 279768
This commit is contained in:
Kostya Serebryany 2016-08-25 19:08:10 +00:00
parent 260daed147
commit 3a46def40c
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ static void die(const char* msg, int err) {
static void ctxfunc() { static void ctxfunc() {
pthread_mutex_lock(&mutex); pthread_mutex_lock(&mutex);
ctxfunc_started = 1; ctxfunc_started = 1;
printf("ctxfunc\n"); // printf("ctxfunc\n");
pthread_cond_signal(&cond); pthread_cond_signal(&cond);
pthread_mutex_unlock(&mutex); pthread_mutex_unlock(&mutex);
// Leave this context alive when the program exits. // Leave this context alive when the program exits.
@ -36,11 +36,11 @@ static void* thread(void* arg) {
if (getcontext(&ctx) < 0) if (getcontext(&ctx) < 0)
die("getcontext", 0); die("getcontext", 0);
stack = malloc(1 << 12); stack = malloc(1 << 11);
if (stack == NULL) if (stack == NULL)
die("malloc", 0); die("malloc", 0);
ctx.uc_stack.ss_sp = stack; ctx.uc_stack.ss_sp = stack;
ctx.uc_stack.ss_size = 1 << 12; ctx.uc_stack.ss_size = 1 << 11;
makecontext(&ctx, ctxfunc, 0); makecontext(&ctx, ctxfunc, 0);
setcontext(&ctx); setcontext(&ctx);
die("setcontext", 0); die("setcontext", 0);