aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 393758eee4..72a524ece5 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -368,6 +368,7 @@ private slots:
void saveAccumulatorBeforeToInt32();
void intMinDividedByMinusOne();
void undefinedPropertiesInObjectWrapper();
+ void hugeRegexpQuantifiers();
private:
// static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -8994,6 +8995,16 @@ void tst_qqmlecmascript::undefinedPropertiesInObjectWrapper()
QVERIFY(!object.isNull());
}
+void tst_qqmlecmascript::hugeRegexpQuantifiers()
+{
+ QJSEngine engine;
+ QJSValue value = engine.evaluate("/({3072140529})?{3072140529}/");
+
+ // It's a regular expression, but it won't match anything.
+ // The RegExp compiler also shouldn't crash.
+ QVERIFY(value.isRegExp());
+}
+
QTEST_MAIN(tst_qqmlecmascript)
#include "tst_qqmlecmascript.moc"