From a533788a1f7e6c2e4fd90d40e43b0b5bf4a7e8fe Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 30 Mar 2018 20:44:58 +0200 Subject: [PATCH] change a fixme into an assert --- src/simix/smx_context.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) 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; -- 2.20.1