Commit a61f5ccd authored by Maya Lekova's avatar Maya Lekova Committed by Commit Bot

[test] Fix flaky OOM regression test

The test was originally testing the max string length limit, but due to
refactoring of Array.join started consuming too much memory, resulting in
OOMs on TSAN builds. The new implementation still checks for the limit,
while reducing the memory consumption drastically.

R=jarin@chromium.org

Bug: v8:8504, chromium:336820
Change-Id: I4db9001541103d5908149e623ce4a4beee551e6c
Reviewed-on: https://chromium-review.googlesource.com/c/1426839Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59000}
parent b959ece4
......@@ -28,11 +28,10 @@
// Flags: --max-old-space-size=1600
assertThrows((function() {
s = "Hello World!\n";
while (true) {
x = new Array();
x[0] = s;
x[1000] = s;
x[10000] = s;
s = x.join("::");
}}), RangeError);
let str = "a".repeat(1e7);
let arr = new Array(2000);
for (let i = 0; i < 200; ++i) {
arr[i*10] = str;
}
let res = arr.join(':');
}), RangeError);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment