From d3c8044179f575dc13b28414e9ec2bfb67c6c3d6 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 11 Apr 2014 11:32:10 +0200 Subject: [PATCH 1/1] Add comment to inform that stack protection is broken when PTH_STACKGROWTH == 1. --- src/simix/smx_context.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/simix/smx_context.c b/src/simix/smx_context.c index 186b1236df..b0d7af6661 100644 --- a/src/simix/smx_context.c +++ b/src/simix/smx_context.c @@ -124,6 +124,10 @@ void *SIMIX_context_stack_new(void) { void *stack; + /* FIXME: current code for stack protection assumes that stacks are growing + * downward (PTH_STACKGROWTH == -1). Protected pages need to be but after the + * stack when PTH_STACKGROWTH == 1. */ + if (smx_context_guard_size > 0 && !MC_is_active()) { size_t size = smx_context_stack_size + smx_context_guard_size; #ifdef HAVE_MC -- 2.20.1