diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-04-22 15:56:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-22 15:56:38 -0700 |
commit | d4f5162f62e9ea920abd196bd5ca2f9505e2823e (patch) | |
tree | 90cbba9a09239e7ee48f1e94d339c7b31e376cb3 /scripts | |
parent | 711a22c65f28029ae0ca2d31a0cd6f8be9b953c7 (diff) | |
download | binaryen-d4f5162f62e9ea920abd196bd5ca2f9505e2823e.tar.gz binaryen-d4f5162f62e9ea920abd196bd5ca2f9505e2823e.tar.bz2 binaryen-d4f5162f62e9ea920abd196bd5ca2f9505e2823e.zip |
Finish bulk memory support (#2030)
Implement interpretation of remaining bulk memory ops, add bulk memory
spec tests with light modifications, fix bugs preventing the fuzzer
from running correctly with bulk memory, and fix bugs found by the
fuzzer.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/fuzz_opt.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index b138209f5..cd4912475 100644 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -138,12 +138,12 @@ def run_vm(cmd): def run_bynterp(wasm): - return fix_output(run_vm([in_bin('wasm-opt'), wasm, '--fuzz-exec-before'])) + return fix_output(run_vm([in_bin('wasm-opt'), wasm, '--fuzz-exec-before'] + FUZZ_OPTS)) def run_wasm2js(wasm): - wrapper = run([in_bin('wasm-opt'), wasm, '--emit-js-wrapper=/dev/stdout']) - main = run([in_bin('wasm2js'), wasm, '--emscripten']) + wrapper = run([in_bin('wasm-opt'), wasm, '--emit-js-wrapper=/dev/stdout'] + FUZZ_OPTS) + main = run([in_bin('wasm2js'), wasm, '--emscripten'] + FUZZ_OPTS) with open(os.path.join(options.binaryen_root, 'scripts', 'wasm2js.js')) as f: glue = f.read() with open('js.js', 'w') as f: @@ -193,7 +193,7 @@ def test_one(infile, opts): before = run_vms('a.') print('----------------') # gather VM outputs on processed file - run([in_bin('wasm-opt'), 'a.wasm', '-o', 'b.wasm'] + opts) + run([in_bin('wasm-opt'), 'a.wasm', '-o', 'b.wasm'] + opts + FUZZ_OPTS) wasm_size = os.stat('b.wasm').st_size bytes += wasm_size print('post js size:', os.stat('a.js').st_size, ' wasm size:', wasm_size) @@ -205,10 +205,10 @@ def test_one(infile, opts): if NANS: break # fuzz binaryen interpreter itself. separate invocation so result is easily fuzzable - run([in_bin('wasm-opt'), 'a.wasm', '--fuzz-exec', '--fuzz-binary'] + opts) + run([in_bin('wasm-opt'), 'a.wasm', '--fuzz-exec', '--fuzz-binary'] + opts + FUZZ_OPTS) # check for determinism - run([in_bin('wasm-opt'), 'a.wasm', '-o', 'b.wasm'] + opts) - run([in_bin('wasm-opt'), 'a.wasm', '-o', 'c.wasm'] + opts) + run([in_bin('wasm-opt'), 'a.wasm', '-o', 'b.wasm'] + opts + FUZZ_OPTS) + run([in_bin('wasm-opt'), 'a.wasm', '-o', 'c.wasm'] + opts + FUZZ_OPTS) assert open('b.wasm').read() == open('c.wasm').read(), 'output must be deterministic' return bytes |