It appears that the native C stack is too small top properly run function-apply-many-args.js. When run on ARM64 with a ~1M stack, the output is: Tests that we throw an error when passing a number of arguments beyond a certain threshold. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS f.apply(null) is 0 PASS f.apply(null, []) is 0 PASS f.apply(null, [1]) is 1 PASS f.apply(null, new Array(10)) is 10 PASS f.apply(null, new Array(1000)) is 1000 PASS f.apply(null, new Array(65536)) is 65536 PASS f.apply(null, new Array(65537)) threw exception RangeError: Maximum call stack size exceeded.. PASS f.apply(null, new Array(65537)) threw exception RangeError: Maximum call stack size exceeded.. PASS f.apply(null, bigArray) threw exception RangeError: Maximum call stack size exceeded.. PASS g.apply(null) is 0 PASS g.apply(null, []) is 0 PASS g.apply(null, [1]) is 1 PASS g.apply(null, new Array(10)) is 10 PASS g.apply(null, new Array(1000)) is 1000 FAIL g.apply(null, new Array(65536)) should be 65536. Threw exception RangeError: Maximum call stack size exceeded. PASS g.apply(null, new Array(65537)) threw exception RangeError: Maximum call stack size exceeded.. PASS g.apply(null, new Array(65537)) threw exception RangeError: Maximum call stack size exceeded.. PASS g.apply(null, bigArray) threw exception RangeError: Maximum call stack size exceeded.. ...
Created attachment 234099 [details] Patch
Comment on attachment 234099 [details] Patch r=me
Committed r170602: <http://trac.webkit.org/changeset/170602>