From eb363c3a0b7f96015d7b8f2551dbeaa86f5acf16 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 26 Apr 2019 09:54:28 +0200 Subject: Fix maximum call stack depth limits for ASAN builds ASAN enabled builds require more stack space and therefore our call depth limits should be lower. In my measurements with a recursion through arrow functions with the interpreter, as per the test case in the bug report, different types of builds require different amounts of stack space. On x86-64 Linux, I measured, by printing $rsp and subtracting: Debug: ~6k Debug with -Og: ~590 bytes Release with -O2: ~570 bytes Release (-O2) with ASAN: ~40k Fixes: QTBUG-75410 Change-Id: I403b261c677b1adb9f349958339b5a1294ae4d5d Reviewed-by: Erik Verbruggen Reviewed-by: Ulf Hermann --- src/qml/jsruntime/qv4engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index bd1124beb6..966ff12506 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -169,7 +169,7 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine) bool ok = false; maxCallDepth = qEnvironmentVariableIntValue("QV4_MAX_CALL_DEPTH", &ok); if (!ok || maxCallDepth <= 0) { -#ifdef QT_NO_DEBUG +#if defined(QT_NO_DEBUG) && !defined(__SANITIZE_ADDRESS__) maxCallDepth = 1234; #else // no (tail call) optimization is done, so there'll be a lot mare stack frames active -- cgit v1.2.3