Skip to content

Commit c1a54d5

Browse files
joyeecheungV8 LUCI CQ
authored andcommitted
Skip regress-1320641 when the system does not have enough memory
Change-Id: I23a5232f6437c4bc77390796ee2986f1600cb1bf Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4689686 Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#88973}
1 parent 75a86fc commit c1a54d5

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

test/mjsunit/regress/regress-1320641.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@ function foo(){
88
const xs = new Uint16Array(3775336418);
99
return xs[-981886074];
1010
}
11-
%PrepareFunctionForOptimization(foo);
12-
foo();
1311

14-
assertEquals(undefined, foo());
15-
%OptimizeFunctionOnNextCall(foo);
16-
assertEquals(undefined, foo());
12+
var skip = false;
13+
try {
14+
new Uint16Array(3775336418);
15+
} catch (e) {
16+
if (e.message.test(/Array buffer allocation failed/)) {
17+
skip = true; // We don't have enough memory, just skip the test.
18+
}
19+
}
20+
21+
if (!skip) {
22+
%PrepareFunctionForOptimization(foo);
23+
foo();
24+
25+
assertEquals(undefined, foo());
26+
%OptimizeFunctionOnNextCall(foo);
27+
assertEquals(undefined, foo());
28+
}

0 commit comments

Comments
 (0)