Commit de371939 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Catch stack overflow while parsing for-loops

Bug: chromium:999853
Change-Id: I5ff8a1d742b871487bc0b0235f4f24d0aaf5c20e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1782176
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63530}
parent e07641f3
......@@ -5865,6 +5865,7 @@ typename ParserBase<Impl>::ForStatementT ParserBase<Impl>::ParseStandardForLoop(
int stmt_pos, ZonePtrList<const AstRawString>* labels,
ZonePtrList<const AstRawString>* own_labels, ExpressionT* cond,
StatementT* next, StatementT* body) {
CheckStackOverflow();
ForStatementT loop = factory()->NewForStatement(labels, own_labels, stmt_pos);
TargetT target(this, loop);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment