GeezerVison is showing github.com — deps: V8: cherry-pick c1a54d5ffcd1 · nodejs/node@c8e1782
File tree
Expand file treeCollapse file tree
Open diff view settings
deps/v8/test/mjsunit/regress
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: common.gypi +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
36 | 36 |
|
37 | 37 | # Reset this number to 0 on major V8 upgrades. |
38 | 38 | # Increment by one for each non-official patch applied to deps/v8. |
39 | | - 'v8_embedder_string': '-node.10', |
| 39 | + 'v8_embedder_string': '-node.12', |
40 | 40 |
|
41 | 41 | ##### V8 defaults for Node.js ##### |
42 | 42 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: deps/v8/test/mjsunit/regress/regress-1320641.js +17-5Lines changed: 17 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,9 +8,21 @@ function foo(){ |
8 | 8 | const xs = new Uint16Array(3775336418); |
9 | 9 | return xs[-981886074]; |
10 | 10 | } |
11 | | -%PrepareFunctionForOptimization(foo); |
12 | | -foo(); |
13 | 11 |
|
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 | +} |