From 075c07c2a91891b2039671af0a7ec9dabb4e2554 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 27 Apr 2026 09:27:05 -0700 Subject: [PATCH 1/2] fix --- scripts/fuzz_opt.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 69d51259e92..e70851e647b 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -2219,6 +2219,7 @@ def do_handle_pair(self, input, before_wasm, after_wasm, opts): def do_run(self, vm, js, wasm): out = vm.run_js(js, wasm, checked=False) + # Clean up stack traces. cleaned = [] for line in out.splitlines(): if 'RuntimeError:' in line or 'TypeError:' in line: @@ -2240,7 +2241,14 @@ def do_run(self, vm, js, wasm): # Ignore it, as details of traces differ based on optimizations. continue cleaned.append(line) - return '\n'.join(cleaned) + cleaned = '\n'.join(cleaned) + + # Clean up function references, which can differ after opts, things like + # + # function 77() { [native code] } + # + cleaned = re.sub(r'function \d+\(\) ', 'function () ', cleaned) + return cleaned def can_run_on_wasm(self, wasm): return all_disallowed(DISALLOWED_FEATURES_IN_V8) From 4fdf0ed6068cdd87fd3ff12f9160485a07e911a1 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 27 Apr 2026 09:29:15 -0700 Subject: [PATCH 2/2] fix --- scripts/fuzz_opt.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index e70851e647b..e74717fba20 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -2219,6 +2219,10 @@ def do_handle_pair(self, input, before_wasm, after_wasm, opts): def do_run(self, vm, js, wasm): out = vm.run_js(js, wasm, checked=False) + # VM crashes are actual issues we want to find. + if '(core dumped)' in out or 'Received signal' in out or '== C stack trace ==' in out or '== JS stack trace ==' in out: + raise Exception(f"VM crash:\n\n{out}") + # Clean up stack traces. cleaned = [] for line in out.splitlines():