Closed jessysaurusrex closed 2 years ago
The essential part of the PoC is:
function* v11(v12,v13) {
}
const v16 = new Int32Array(36251);
try {
const v17 = v16.reduce(v11);
} catch(v18) {
}
This triggers a JavaScript stack overflow when the reducer function is a generator. XS detects the overflow and throws a RangeError
. Because the error is caught, execution continues and eventually fails
When xst is used to run test262,, the exception would be unhandled which would cause the test to exit cleanly and report an error. For fuzzing, we may want to completely halt the test case on the JavaScript stack overflow. FWIW _ on production deployments like xsnap and the Moddable SDK runtime, execution is terminated when a JavaScript stack overflow is detected.
Verified fixed in fb7b2c2
Version:
eecb298fb1d9019854591515664e369ad9cf5b53
poc.js
Invocation
xst poc.js