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

[parser] Check stackoverflow in ParseBindingPattern

Bug: chromium:903874
Change-Id: If9828ae206b9bc1407e7d3f217d5fb894a4fe747
Reviewed-on: https://chromium-review.googlesource.com/c/1329688Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57420}
parent 57512786
......@@ -1661,6 +1661,7 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseBindingPattern() {
IdentifierT name = ParseAndClassifyIdentifier();
result = impl()->ExpressionFromIdentifier(name, beg_pos);
} else {
CheckStackOverflow();
classifier()->RecordNonSimpleParameter();
if (token == Token::LBRACK) {
......
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var code = "function f(" + ("{o(".repeat(10000));
eval(code);
*%(basename)s:6: RangeError: Maximum call stack size exceeded
eval(code);
^
RangeError: Maximum call stack size exceeded
at *%(basename)s:6:6
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