From f808e978aefb2d4b89786d1b86f56d6996da92c8 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 20 May 2026 21:33:53 -0700 Subject: [PATCH] Fix test_cluster_fuzz.py V8 flags mismatch When running test_cluster_fuzz.py, it was launching V8 with a hardcoded list of flags, instead of reading the flags from the generated flags file. This caused V8 to fail compilation of test cases that included relaxed atomics (which are generated by default now since relaxed atomics fuzzing was enabled), because V8 requires --experimental-wasm-acquire-release flag for them, and this flag was not in the hardcoded list. This CL fixes this by reading the flags from the generated flags file to faithfully simulate how ClusterFuzz runs V8. --- test/unit/test_cluster_fuzz.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/unit/test_cluster_fuzz.py b/test/unit/test_cluster_fuzz.py index 5dae09cc06f..e40c449be4b 100644 --- a/test/unit/test_cluster_fuzz.py +++ b/test/unit/test_cluster_fuzz.py @@ -435,11 +435,14 @@ def test_file_contents(self): valid_executions = 0 for i in range(1, N + 1): fuzz_file = os.path.join(temp_dir.name, f'fuzz-binaryen-{i}.js') + flags_file = os.path.join(temp_dir.name, f'flags-binaryen-{i}.js') + # Read flags from flags file to faithfully simulate how + # ClusterFuzz runs V8. + with open(flags_file) as f: + flags = f.read().strip().split() # Add --fuzzing to allow legacy and standard EH to coexist - cmd = [shared.V8, - '--wasm-staging', - '--experimental-wasm-custom-descriptors', + cmd = [shared.V8] + flags + [ '--fuzzing', fuzz_file] # Capture stderr even though we will not read it. It may