From 3130409376dff61eb7b1bec01166ff72e927bad6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 14 Jul 2021 15:07:42 -0700 Subject: 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. --- scripts/fuzz_opt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/fuzz_opt.py') 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) -- cgit v1.2.3