v8/test/mjsunit/regress/regress-748069.js
Jakob Kummerow 4f79c30583 Speed up two tests by skipping slow asserts
pending a better approach.

Bug: v8:8516
Change-Id: Ic107184b46c85ae5724619cc82c99686aee7edb9
Reviewed-on: https://chromium-review.googlesource.com/c/1352794
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57893}
2018-11-28 09:17:23 +00:00

16 lines
480 B
JavaScript

// Copyright 2017 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.
// This test gets very slow with slow asserts.
// Flags: --noenable-slow-asserts
try {
var a = 'a'.repeat(1 << 28);
} catch (e) {
// If the allocation fails, we don't care, because we can't cause the
// overflow.
}
// Cause an overflow in worst-case calculation for string replacement.
JSON.stringify(a);