diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 72df5a75dbb..be1b208b456 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -1693,9 +1693,9 @@ def optimize(name): # prepare the list of exports to call. the format is # - # exports:A,B,C + # exports:["A","B","C"] # - exports_to_call = 'exports:' + ','.join(exports) + exports_to_call = 'exports:' + json.dumps(exports) # get the output from the split modules, linking them using JS # TODO run liftoff/turboshaft/etc. diff --git a/scripts/fuzz_shell.js b/scripts/fuzz_shell.js index d16c49624b9..06a1030a215 100644 --- a/scripts/fuzz_shell.js +++ b/scripts/fuzz_shell.js @@ -57,7 +57,12 @@ var fuzzSplit = false; for (var i = 0; i < argv.length; i++) { var curr = argv[i]; if (curr.startsWith('exports:')) { - exportsToCall = curr.substr('exports:'.length).split(','); + var payload = curr.substr('exports:'.length); + if (payload.startsWith('[')) { + exportsToCall = JSON.parse(payload); + } else { + exportsToCall = payload ? payload.split(',') : []; + } argv.splice(i, 1); i--; } else if (curr == '--fuzz-split') {