diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-12-04 15:47:06 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-12-05 10:02:11 +0100 |
commit | cc66dd33cc44b5131c27d85daecf1b920f900f49 (patch) | |
tree | 4185a9060abc9ce04a5798dd93873ff7bb1e991c /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | e2af7c3b37095e601a84cc52de69a99af8e5d3a2 (diff) |
Compiler: Support >32k stack slots
Previously, the code generator would truncate the stack slots when
writing the compiled function, as that one only had a 16bit field for
them.
Also, add a debug-mode check for stack overflows to the interpreter.
Unfortunately, as it triggers a stack overflow, the test will not
reliably fail without this change.
Fixes: QTBUG-80511
Change-Id: I3019bb2de657ae4c3e1040db798a83533f854bff
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 8824dfd019..70885eb69c 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -379,6 +379,7 @@ private slots: void singletonTypeWrapperLookup(); void getThisObject(); void semicolonAfterProperty(); + void hugeStack(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -9198,6 +9199,18 @@ void tst_qqmlecmascript::semicolonAfterProperty() QVERIFY(!test.isNull()); } +void tst_qqmlecmascript::hugeStack() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("hugeStack.qml")); + QVERIFY(component.isReady()); + QScopedPointer<QObject> test(component.create()); + QVERIFY(!test.isNull()); + + QVariant huge = test->property("longList"); + QCOMPARE(qvariant_cast<QJSValue>(huge).property(QLatin1String("length")).toInt(), 33059); +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" |