Skip to content

Commit 5dc0e8c

Browse files
authored
Fuzzing: Ignore differences in names that wasm2js fixes up (#7200)
wasm2js renames exports to js-valid names. That difference can be noticeable when we compare it to the original names, so fix that up. This is needed for #7198: that PR adds more invokes, including invokes of imports, whose names can be modified by wasm2js.
1 parent 5a17afc commit 5dc0e8c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/fuzz_opt.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,10 @@ def fix_output_for_js(x):
10861086
# fuzzer can notice.
10871087
x = re.sub(r' null', ' 0', x)
10881088

1089+
# wasm2js converts exports to valid JS forms, which affects some of
1090+
# the names in the test suite. Fix those up.
1091+
x = x.replace('log-', 'log_')
1092+
10891093
# check if a number is 0 or a subnormal, which is basically zero
10901094
def is_basically_zero(x):
10911095
# to check if something is a subnormal, compare it to the largest one

0 commit comments

Comments
 (0)