Skip to content

Commit 069c945

Browse files
authored
PreserveImportsExportsJS fuzzer: Handle JS differences in stack traces (#8610)
Generalize our stack-trace ignoring code, as it turns out the JS parts of traces can differ based on optimizations.
1 parent ef4cbbe commit 069c945

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/fuzz_opt.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,13 +2223,14 @@ def do_run(self, vm, js, wasm):
22232223
# must also remove the specific trap, as Binaryen can change
22242224
# that.
22252225
line = 'TRAP'
2226-
elif 'wasm://' in line or '(<anonymous>)' in line:
2226+
elif line.startswith(' at '):
22272227
# This is part of a stack trace like
22282228
#
22292229
# at wasm://wasm/12345678:wasm-function[42]:0x123
22302230
# at (<anonymous>)
2231+
# at file.js
22312232
#
2232-
# Ignore it, as traces differ based on optimizations.
2233+
# Ignore it, as details of traces differ based on optimizations.
22332234
continue
22342235
cleaned.append(line)
22352236
return '\n'.join(cleaned)

0 commit comments

Comments
 (0)