diff options
author | Alon Zakai <azakai@google.com> | 2021-07-14 15:07:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-14 15:07:42 -0700 |
commit | 3130409376dff61eb7b1bec01166ff72e927bad6 (patch) | |
tree | 6352343ee5f92422c1ebbc8769171a66cf47592e /scripts/fuzz_opt.py | |
parent | b842715392a6e18cfae6bdabce670a1d618611fc (diff) | |
download | binaryen-3130409376dff61eb7b1bec01166ff72e927bad6.tar.gz binaryen-3130409376dff61eb7b1bec01166ff72e927bad6.tar.bz2 binaryen-3130409376dff61eb7b1bec01166ff72e927bad6.zip |
Fuzzer: Use NameTypes in RoundTrip (#3986)
This works around the issue with wasm gc types sometimes getting
truncated (as the default names can be very long or even infinitely
recursive). If the truncation leads to name collision, the wast is not
valid.
Diffstat (limited to 'scripts/fuzz_opt.py')
-rwxr-xr-x | scripts/fuzz_opt.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index eff4baeef..f4c260665 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -886,7 +886,11 @@ class RoundtripText(TestCaseHandler): frequency = 0.05 def handle(self, wasm): - run([in_bin('wasm-dis'), wasm, '-o', 'a.wast']) + # use name-types because in wasm GC we can end up truncating the default + # names which are very long, causing names to collide and the wast to be + # invalid + # FIXME: run name-types by default during load? + run([in_bin('wasm-opt'), wasm, '--name-types', '-S', '-o', 'a.wast'] + FEATURE_OPTS) run([in_bin('wasm-opt'), 'a.wast'] + FEATURE_OPTS) |