summaryrefslogtreecommitdiff
path: root/scripts/fuzz_shell.js
Commit message (Collapse)AuthorAgeFilesLines
* Asyncify fuzzing harness fix for growth (#3205)Alon Zakai2020-10-091-2/+9
| | | | | Fuzzing Asyncify on data with a memory growth showed that the harness did not handle a growth. When growth happens we must recreate the view. For simplicity, always refresh, in a location that dominates all the uses.
* Fuzz asyncify fuzzer: when no exported memory, skip (#2874)Alon Zakai2020-05-271-3/+4
| | | | We need the memory to be exported in order to read and write stuff for the asyncify data structure.
* Enable cross-VM fuzzing + related improvements to fuzz_opt.py (#2762)Alon Zakai2020-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main benefit here is comparing VMs, instead of just comparing each VM to itself after opts. Comparing VMs is a little tricky since there is room for nondeterminism with how results are printed and other annoying things, which is why that didn't work well earlier. With this PR I can run 10's of thousands of iterations without finding any issues between v8 and the binaryen interpreter. That's after fixing the various issues over the last few days as found by this: #2760 #2757 #2750 #2752 Aside from that main benefit I ended up adding more improvements to make it practical to do all that testing: Randomize global fuzz settings like whether we allow NaNs and out-of-bounds memory accesses. (This was necessary here since we have to disable cross-VM comparisons if NaNs are enabled.) Better logging of statistics like how many times each handler was run. Remove redundant FuzzExecImmediately handler (looks like after past refactorings it was no longer adding any value). Deterministic testcase handling: if you run e.g. fuzz_opt.py 42 it will run one testcase and exactly the same one. If you run without an argument it will run forever until it fails, and if it fails, it prints out that ID so that you can easily reproduce it (I guess, on the same binaryen + same python, not sure how python's deterministic RNG changes between versions and builds). Upgrade to Python 3.
* Bysyncify => Asyncify (#2226)Alon Zakai2019-07-151-36/+36
| | | | | | | After some discussion this seems like a less confusing name: what the pass does is "asyncify" code, after all. The one downside is the name overlaps with the old emscripten "Asyncify" utility, which we'll need to clarify in the docs there. This keeps the old --bysyncify flag around for now, which is helpful for avoiding temporary breakage on CI as we move the emscripten side as well.
* Support wasm files without exported memory in scripts/fuzz_shell.js (#2210)Alon Zakai2019-07-091-1/+3
|
* Bysyncify: Fuzzing (#2192)Alon Zakai2019-07-011-0/+209
Gets fuzzing support for Bysyncify working. * Add the python to run the fuzzing on bysyncify. * Add a JS script to load and run a testcase with bysyncify support. The code has all the runtime support for sleep/resume etc., which it does on calls to imports at random in a deterministic manner. * Export memory from fuzzer so JS can access it. * Fix tiny builder bug with makeExport.