Skip to content

Commit 42faa40

Browse files
authored
Fuzzer: Fix escaping of wasm-ctor-eval names (#7223)
Apparently we have some exports that need escaping in their names, and we should not escape them twice.
1 parent de004ab commit 42faa40

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/fuzz_opt.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,11 @@ def handle(self, wasm):
13431343
if not ctors:
13441344
return
13451345

1346+
# Fix escaping of the names, as we will be passing them as commandline
1347+
# parameters below (e.g. we want --ctors=foo\28bar and not
1348+
# --ctors=foo\\28bar; that extra escaping \ would cause an error).
1349+
ctors = ctors.replace('\\\\', '\\')
1350+
13461351
# eval the wasm.
13471352
# we can use --ignore-external-input because the fuzzer passes in 0 to
13481353
# all params, which is the same as ctor-eval assumes in this mode.

0 commit comments

Comments
 (0)