From f1b20e0c20e91b4f2713654ff980ca2f8cbcfd4c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 9 Apr 2026 11:20:26 -0700 Subject: [PATCH 1/2] nfc --- scripts/fuzz_opt.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 83d351d67f1..94418301aec 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -606,7 +606,7 @@ def note_ignored_vm_run(reason, extra_text='', amount=1): # Run a VM command, and filter out known issues. -def run_vm(cmd): +def run_vm(cmd, checked=True): def filter_known_issues(output): known_issues = [ # can be caused by flatten, ssa, etc. passes @@ -649,7 +649,11 @@ def filter_known_issues(output): try: # some known issues do not cause the entire process to fail - return filter_known_issues(run(cmd)) + if checked: + ret = run(cmd) + else: + ret = run_unchecked(cmd) + return filter_known_issues(ret) except subprocess.CalledProcessError: # other known issues do make it fail, so re-run without checking for # success and see if we should ignore it @@ -696,6 +700,7 @@ def get_v8_extra_flags(): V8_LIFTOFF_ARGS = ['--liftoff'] +V8_NO_LIFTOFF_ARGS = ['--no-liftoff'] # Default to running with liftoff enabled, because we need to pick either @@ -831,8 +836,13 @@ def can_compare_to_other(self, other): class D8: name = 'd8' - def run(self, wasm, extra_d8_flags=[]): - return run_vm([shared.V8, get_fuzz_shell_js()] + shared.V8_OPTS + get_v8_extra_flags() + extra_d8_flags + ['--', wasm]) + extra_d8_flags = [] + + def run_js(self, js, wasm, checked=True): + return run_vm([shared.V8, js] + shared.V8_OPTS + get_v8_extra_flags() + self.extra_d8_flags + ['--', wasm], checked=checked) + + def run(self, wasm): + return self.run(js=get_fuzz_shell_js(), wasm=wasm) def can_run(self, wasm): return all_disallowed(DISALLOWED_FEATURES_IN_V8) @@ -856,16 +866,13 @@ def can_compare_to_other(self, other): class D8Liftoff(D8): name = 'd8_liftoff' - def run(self, wasm): - return super().run(wasm, extra_d8_flags=V8_LIFTOFF_ARGS) + extra_d8_flags = V8_LIFTOFF_ARGS class D8Turboshaft(D8): name = 'd8_turboshaft' - def run(self, wasm): - flags = ['--no-liftoff'] - return super().run(wasm, extra_d8_flags=flags) + extra_d8_flags = V8_NO_LIFTOFF_ARGS class Wasm2C: From 213dbb4071c2c68445d9f1d033335868337d71c3 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 9 Apr 2026 11:26:30 -0700 Subject: [PATCH 2/2] typo --- scripts/fuzz_opt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 94418301aec..177b0f9dd66 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -842,7 +842,7 @@ def run_js(self, js, wasm, checked=True): return run_vm([shared.V8, js] + shared.V8_OPTS + get_v8_extra_flags() + self.extra_d8_flags + ['--', wasm], checked=checked) def run(self, wasm): - return self.run(js=get_fuzz_shell_js(), wasm=wasm) + return self.run_js(js=get_fuzz_shell_js(), wasm=wasm) def can_run(self, wasm): return all_disallowed(DISALLOWED_FEATURES_IN_V8)