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/qml/jsruntime') 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 From 3a349ea9229eae7e3e189e92e3124b169fe4f447 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 25 Apr 2019 15:07:33 +0200 Subject: Don't call unknown types "null" That is rather confusing. Task-number: QTBUG-74815 Change-Id: Id683a7f9efd63c8859c5740ceab9f161cea46ee3 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4qobjectwrapper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime') diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 5467e730e3..6fed538fa8 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -565,9 +565,9 @@ void QObjectWrapper::setProperty(ExecutionEngine *engine, QObject *object, QQmlP QQmlContextData *callingQmlContext = scope.engine->callingQmlContext(); if (!QQmlPropertyPrivate::write(object, *property, v, callingQmlContext)) { - const char *valueType = nullptr; - if (v.userType() == QVariant::Invalid) valueType = "null"; - else valueType = QMetaType::typeName(v.userType()); + const char *valueType = (v.userType() == QMetaType::UnknownType) + ? "an unknown type" + : QMetaType::typeName(v.userType()); const char *targetTypeName = QMetaType::typeName(property->propType()); if (!targetTypeName) -- cgit v1.2.3