mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1033115 - pass intermediate array as root for PJS gc for Array.prototype.reducePar. r=shu
This commit is contained in:
parent
749d42ac21
commit
b8cf55d45c
@ -817,7 +817,7 @@ function ArrayReducePar(func, mode) {
|
||||
var numSlices = slicesInfo.count;
|
||||
var subreductions = NewDenseArray(numSlices);
|
||||
|
||||
ForkJoin(reduceThread, 0, numSlices, ForkJoinMode(mode), null);
|
||||
ForkJoin(reduceThread, 0, numSlices, ForkJoinMode(mode), subreductions);
|
||||
|
||||
var accumulator = subreductions[0];
|
||||
for (var i = 1; i < numSlices; i++)
|
||||
|
21
js/src/jit-test/tests/parallel/bug1033115-2.js
Normal file
21
js/src/jit-test/tests/parallel/bug1033115-2.js
Normal file
@ -0,0 +1,21 @@
|
||||
// Failed to pass the subreductions as an assignment root to Array.prototype.reducePar,
|
||||
// fuzzing test case discovered separately.
|
||||
|
||||
if (!getBuildConfiguration().parallelJS)
|
||||
quit(0);
|
||||
|
||||
x = [];
|
||||
y = x.mapPar(function() {});
|
||||
Object.defineProperty(y, 3, {
|
||||
get: (function( ... $8) {
|
||||
try {
|
||||
Int8Array(y);
|
||||
x.reducePar(function() function q() 1);
|
||||
} catch (e) {}
|
||||
})
|
||||
});
|
||||
var x = [1,2,3];
|
||||
function rsh() {
|
||||
return y.toSource() >> 2.0;
|
||||
}
|
||||
rsh();
|
13
js/src/jit-test/tests/parallel/bug1033115.js
Normal file
13
js/src/jit-test/tests/parallel/bug1033115.js
Normal file
@ -0,0 +1,13 @@
|
||||
// Failed to pass the subreductions as an assignment root to Array.prototype.reducePar,
|
||||
// fuzzing test case.
|
||||
|
||||
if (!getBuildConfiguration().parallelJS)
|
||||
quit(0);
|
||||
|
||||
x = []
|
||||
x[8] = ((function() {})());
|
||||
for each(let a in [0, 0]) {
|
||||
x.reducePar(function() {
|
||||
return [0];
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user