Commit 489dcd62 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Bump the stack size when --enable-*san is used

The generated code needs a larger stack when optimizations are
disabled, i.e. with --enable-debugging-symbols.
parent f1d356a0
......@@ -276,7 +276,11 @@ init_params(struct cli *cli)
low = sysconf(_SC_THREAD_STACK_MIN);
MCF_ParamConf(MCF_MINIMUM, "thread_pool_stack", "%jdb", (intmax_t)low);
#if defined(WITH_SANITIZERS)
def = 92 * 1024;
#else
def = 48 * 1024;
#endif
if (def < low)
def = low;
MCF_ParamConf(MCF_DEFAULT, "thread_pool_stack", "%jdb", (intmax_t)def);
......
......@@ -258,7 +258,7 @@ AC_ARG_ENABLE(msan,
MSAN_FLAGS="-fsanitize=memory")
if test "x$UBSAN_FLAGS$TSAN_FLAGS$ASAN_FLAGS$MSAN_FLAGS" != "x"; then
SAN_CFLAGS="${UBSAN_FLAGS} ${TSAN_FLAGS} ${ASAN_FLAGS} ${MSAN_FLAGS} -fPIC -fPIE -fno-omit-frame-pointer"
SAN_CFLAGS="-DWITH_SANITIZERS=1 ${UBSAN_FLAGS} ${TSAN_FLAGS} ${ASAN_FLAGS} ${MSAN_FLAGS} -fPIC -fPIE -fno-omit-frame-pointer"
SAN_LDFLAGS="${UBSAN_FLAGS} ${TSAN_FLAGS} ${ASAN_FLAGS} ${MSAN_FLAGS} -pie"
fi
AC_SUBST(SAN_CFLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment