v8/test/mjsunit/regress/regress-1255368.js
Jakob Gruber 2dd23f7575 [regexp] Ensure regress-1255368 runs only with irregexp
The expected assertion is specific to irregexp codegen.

Bug: chromium:1255368
Change-Id: I14d033285014727de2e63582ed798fc82570497d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3207892
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77254}
2021-10-06 11:36:34 +00:00

11 lines
438 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: --no-regexp-tier-up --no-enable-experimental-regexp-engine
// Flags: --no-regexp-interpret-all
const arr = new Array(20000).fill([1]);
const regexp = RegExp(JSON.stringify(arr));
assertThrows(() => regexp.exec(), SyntaxError, /Regular expression too large/);