You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[wasm] Do not treat wasm throw exceptions inside LiveTests as failures
The test case testWasmCodeGenerationAndCompilationAndExecution treats a
wasm program that throws an exception as a failure and expects this
failure rate to remain below a certain threshold. With the exception-
handling proposal (https://github.com/WebAssembly/exception-handling)
wasm adds support for deliberately throwing exceptions.
As these should also be fuzzed, generating a throw should not be
treated as a failure by this test case.
This change handles this by wrapping the call to the exported wasm
function like this:
try {
instance.exports.w0();
} catch (e) {
if (!(e instance of WebAssembly.Exception)) rethrow e;
}
Still, this highlights the issue of many wasm programs throwing an
unconditional exception, so the weight to generate a throw inside wasm
is now significantly lowered as well. (The same does not apply to a
rethrow as a rethrow is only reachable when such a "low chance" throw
was already emitted, so keeping that higher prevents us from making it
exceedingly rare to cover rethrow edges.)
Change-Id: I17c270edd87aa7d8af97efa1eb6eaded420e9a8f
Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/7963393
Auto-Submit: Matthias Liedtke <[email protected]>
Reviewed-by: Carl Smith <[email protected]>
Commit-Queue: Matthias Liedtke <[email protected]>
0 commit comments