From: Martin Quinson Date: Fri, 30 Mar 2018 18:44:58 +0000 (+0200) Subject: change a fixme into an assert X-Git-Tag: v3.20~574 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a533788a1f7e6c2e4fd90d40e43b0b5bf4a7e8fe?ds=sidebyside change a fixme into an assert --- diff --git a/src/simix/smx_context.cpp b/src/simix/smx_context.cpp index 933ef547b7..6944ddf9d1 100644 --- a/src/simix/smx_context.cpp +++ b/src/simix/smx_context.cpp @@ -165,18 +165,14 @@ void *SIMIX_context_stack_new() { void *stack; - /* FIXME: current code for stack overflow protection assumes that stacks are - * growing downward (PTH_STACKGROWTH == -1). Protected pages need to be put - * after the stack when PTH_STACKGROWTH == 1. */ - if (smx_context_guard_size > 0 && not MC_is_active()) { #if !defined(PTH_STACKGROWTH) || (PTH_STACKGROWTH != -1) - static int warned_once = 0; - if (not warned_once) { - XBT_WARN("Stack overflow protection is known to be broken on your system. Either stack grows upwards, or it was not even tested properly."); - warned_once = 1; - } + xbt_die("Stack overflow protection is known to be broken on your system: you stacks grow upwards (or detection is " + "broken). " + "Please disable stack guards with --cfg=contexts:guard-size:0"); + /* Current code for stack overflow protection assumes that stacks are growing downward (PTH_STACKGROWTH == -1). + * Protected pages need to be put after the stack when PTH_STACKGROWTH == 1. */ #endif size_t size = smx_context_stack_size + smx_context_guard_size;