aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-04-26 09:54:28 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-04-26 13:36:22 +0000
commiteb363c3a0b7f96015d7b8f2551dbeaa86f5acf16 (patch)
tree6deac70bb9ca1bb7e05680625f379ea532efd9c1 /src/qml/jsruntime
parentd8662301188229721b12526a18db7ceb496f1ef1 (diff)
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 <erik.verbruggen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp2
1 files changed, 1 insertions, 1 deletions
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