diff options
author | Alon Zakai <azakai@google.com> | 2022-08-22 16:03:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 23:03:00 +0000 |
commit | 195c4e1804d5a4530c8216d4c9a138b56f676d10 (patch) | |
tree | 5aeca907c334f2673865868ce30ff5f111cbae4d /test/gtest/possible-contents.cpp | |
parent | 0e0c2d9d45068c450ad5df5de47948532dd12c53 (diff) | |
download | binaryen-195c4e1804d5a4530c8216d4c9a138b56f676d10.tar.gz binaryen-195c4e1804d5a4530c8216d4c9a138b56f676d10.tar.bz2 binaryen-195c4e1804d5a4530c8216d4c9a138b56f676d10.zip |
[Fuzzer] Fuzz TrapsNeverHappen mode (#4936)
This mode is tricky to fuzz because the mode is basically "assume traps never
happen; if a trap does happen, that is undefined behavior". So if any trap occurs
in the random fuzz testcase, we can't optimize with -tnh and assume the results
stay to same. To avoid that, we ignore all functions from the first one that traps,
that is, we only compare the code that ran without trapping. That often is a small
subset of the total functions, sadly, but I do see that this ends up with some useful
coverage despite the drawback.
This also requires some fixes to comparing of references, specifically, funcrefs
are printed with the function name/index, but that can change during opts, so
ignore that. This wasn't noticed before because this new fuzzer mode does
comparisons of --fuzz-exec-before output, instead of doing --fuzz-exec which
runs it before and after and compares it internally in wasm-opt. Here we are
comparing the output externally, which we didn't do before.
Diffstat (limited to 'test/gtest/possible-contents.cpp')
0 files changed, 0 insertions, 0 deletions