From: Arnaud Giersch Date: Fri, 11 Apr 2014 09:32:10 +0000 (+0200) Subject: Add comment to inform that stack protection is broken when PTH_STACKGROWTH == 1. X-Git-Tag: v3_11~120^2~13 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d3c8044179f575dc13b28414e9ec2bfb67c6c3d6 Add comment to inform that stack protection is broken when PTH_STACKGROWTH == 1. --- 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