File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1379,8 +1379,12 @@ class CtorEval(TestCaseHandler):
13791379 frequency = 0.1
13801380
13811381 def handle (self , wasm ):
1382- # get the list of func exports, so we can tell ctor-eval what to eval.
1382+ # Get the list of func exports, so we can tell ctor-eval what to eval.
13831383 func_exports = get_exports (wasm , ['func' ])
1384+ # Avoid names that need escaping. Just allow simple names like func_256,
1385+ # which the fuzzer emits
1386+ # TODO: fix escaping in the tool and here
1387+ func_exports = [export for export in func_exports if re .fullmatch (r'^[0-9a-zA-Z_]+$' , export )]
13841388 ctors = ',' .join (func_exports )
13851389 if not ctors :
13861390 return
@@ -1397,11 +1401,6 @@ def handle(self, wasm):
13971401 # get the expected execution results.
13981402 wasm_exec = run_bynterp (wasm , ['--fuzz-exec-before' ])
13991403
1400- # Fix escaping of the names, as we will be passing them as commandline
1401- # parameters below (e.g. we want --ctors=foo\28bar and not
1402- # --ctors=foo\\28bar; that extra escaping \ would cause an error).
1403- ctors = ctors .replace ('\\ \\ ' , '\\ ' )
1404-
14051404 # eval the wasm.
14061405 # we can use --ignore-external-input because the fuzzer passes in 0 to
14071406 # all params, which is the same as ctor-eval assumes in this mode.
You can’t perform that action at this time.
0 commit comments