diff options
author | Alon Zakai <azakai@google.com> | 2020-07-24 06:47:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 06:47:07 -0700 |
commit | 0efd168824ac58abaf8ac484460a43241882dc93 (patch) | |
tree | 9e6ffab15c1f510b090a22f7781e19f677ef2519 /test/dynamicLibrary.asm.js | |
parent | d25b4921d2de5218ac4107084274dbce68e95930 (diff) | |
download | binaryen-0efd168824ac58abaf8ac484460a43241882dc93.tar.gz binaryen-0efd168824ac58abaf8ac484460a43241882dc93.tar.bz2 binaryen-0efd168824ac58abaf8ac484460a43241882dc93.zip |
wasm2js fuzzing: properly ignore trapping code (#2980)
wasm2js fuzzing should not compare outputs if the wasm would
trap. wasm2js traps on far fewer things, and if wasm would trap
(like an indirect call with the wrong type) it can just do weird undefined
things. Previously, if running wasm2js trapped then we ignored
the output, but that't not good enough, as we need to check if
wasm would, exactly for the cases just mentioned where wasm
would trap but wasm2js wouldn't. So run the wasm interpreter
to see if that happens.
When we see such a trap, ignore everything from that function
call onwards. This at least lets us compare the results of
previous calls, which adds some amount of coverage (before
we just ignored the entire output completely, so only if there
was no trap at all did we do any comparisons at all).
Also give better names than "js.js" to the JS files wasm2js
fuzzing creates.
Diffstat (limited to 'test/dynamicLibrary.asm.js')
0 files changed, 0 insertions, 0 deletions