v8/test/mjsunit/regress/regress-1067270.js
Jakob Gruber 30658b6b1b [regexp] Reserve space for all registers in interpreter
This is a minimal version of https://crrev.com/c/2135642 intended for
backmerges.

Ensure that the interpreter has space for all required registers.

Bug: chromium:1067270
Change-Id: Iefd016b4845fb8698d1e0ef5f6a03df0e66aa576
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2137403
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67013}
2020-04-06 14:34:34 +00:00

12 lines
371 B
JavaScript

// Copyright 2020 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: --allow-natives-syntax
const needle = Array(1802).join(" +") + Array(16884).join("A");
const string = "A";
assertEquals(string.search(needle), -1);
assertEquals(string.search(needle), -1);