File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 33
33
34
34
# The V8 flags we put in the "fuzzer flags" files, which tell ClusterFuzz how to
35
35
# run V8. By default we apply all staging flags.
36
- FUZZER_FLAGS_FILE_CONTENTS = '--wasm-staging'
36
+ FUZZER_FLAGS = '--wasm-staging'
37
+
38
+ # Optional V8 flags to add to FUZZER_FLAGS, some of the time.
39
+ OPTIONAL_FUZZER_FLAGS = [
40
+ '--experimental-wasm-revectorize' ,
41
+ ]
37
42
38
43
# Maximum size of the random data that we feed into wasm-opt -ttf. This is
39
44
# smaller than fuzz_opt.py's INPUT_SIZE_MAX because that script is tuned for
@@ -292,7 +297,11 @@ def main(argv):
292
297
flags_file_path = os .path .join (output_dir ,
293
298
get_file_name (FLAGS_FILENAME_PREFIX , i ))
294
299
with open (flags_file_path , 'w' ) as file :
295
- file .write (FUZZER_FLAGS_FILE_CONTENTS )
300
+ flags = FUZZER_FLAGS
301
+ # Some of the time add an additional flag for V8.
302
+ if OPTIONAL_FUZZER_FLAGS and system_random .random () < 0.5 :
303
+ flags += ' ' + system_random .choice (OPTIONAL_FUZZER_FLAGS )
304
+ file .write (flags )
296
305
297
306
print (f'Created testcase: { testcase_file_path } ' )
298
307
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ def test_file_contents(self):
186
186
187
187
# The flags file must contain --wasm-staging
188
188
with open (flags_file ) as f :
189
- self .assertEqual ( f . read (), '--wasm-staging' )
189
+ self .assertIn ( '--wasm-staging' , f . read () )
190
190
191
191
# Extract the wasm file(s) from the JS. Make sure to not notice
192
192
# stale files.
You can’t perform that action at this time.
0 commit comments