6627638a9d
If a stack overflow occurs inside the regexp parser, propagate that information to the parser. Bug: v8:896,chromium:1243989 Change-Id: I5ced27ff968ad97764e156643e1980b3a722af1a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3127717 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#76568}
19 lines
410 B
JavaScript
19 lines
410 B
JavaScript
// Copyright 2021 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.
|
|
//
|
|
// Flags: --stack-size=100
|
|
|
|
function f(x) {
|
|
new x.Uint16Array();
|
|
function h(y) { /[\cA]/; }
|
|
}
|
|
let i = 0;
|
|
function g() {
|
|
try { g(); } catch (e) {}
|
|
if (i++ > 200) return; // The original error was at i == 116.
|
|
f();
|
|
}
|
|
f(this);
|
|
g();
|