v8/test/mjsunit/regress/regress-crbug-926856.js
Mike Stanton 183b857958 [Builtins]: Array.prototype.map out of memory error
If we need to allocate a DOUBLE_ELEMENTS backing store, it's important
to allow large object space allocation.

BUG: chromium:926856

Change-Id: I9dd94f7176891a6f8f11d5f579b67df8151a40b5
Reviewed-on: https://chromium-review.googlesource.com/c/1449531
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59285}
2019-02-01 12:33:19 +00:00

19 lines
411 B
JavaScript

// Copyright 2019 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.
// Need a fast array with enough elements to surpass
// kMaxRegularHeapObjectSize.
var size = 63392;
var a = [];
function build() {
for (let i = 0; i < size; i++) {
a.push(i);
}
}
build();
function c(v) { return v + 0.5; }
a.map(c);