From 73231fe953145ac0df4e62f173e1a90076466012 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 27 Feb 2019 16:01:54 +0100 Subject: Unify the JavaScript parsing recursion checks We only need to check in one central location and we can allow for more recursion. 4k recursions seem tolerable. A common default for stack sizes is 8MB. Each recursion step takes up to 1k stack space in debug mode. So, exhausting this would burn about half of the available stack size. We don't report the exact source location in this case as finding the source location may itself trigger a deep recursion. Fixes: QTBUG-74087 Change-Id: I43e6e20b322f6035c7136a6f381230ec285c30ae Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4runtimecodegen_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qml/jsruntime/qv4runtimecodegen_p.h') diff --git a/src/qml/jsruntime/qv4runtimecodegen_p.h b/src/qml/jsruntime/qv4runtimecodegen_p.h index be66dc57ca..006a6a3cde 100644 --- a/src/qml/jsruntime/qv4runtimecodegen_p.h +++ b/src/qml/jsruntime/qv4runtimecodegen_p.h @@ -71,6 +71,7 @@ public: void throwSyntaxError(const AST::SourceLocation &loc, const QString &detail) override; void throwReferenceError(const AST::SourceLocation &loc, const QString &detail) override; + private: ExecutionEngine *engine; }; -- cgit v1.2.3