Commit 74a2a8f6 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[foozzie] Add flag experiments for gc fuzzing

This will add three gc fuzzing flags with 5% likelihood each to the second
correctness fuzzing config. The random checks are determined by the
top-level random-seed passed to the script.

This change depends on setting the fuzzer random seed as default to the
standard random seed, since the former isn't explicitly passed by
clusterfuzz.

NOTRY=true
TBR=hpayer@chromium.org

Bug: v8:7012
Change-Id: I794dc48bb953b6a95bbc4fc4305ad561bc13b6ee
Reviewed-on: https://chromium-review.googlesource.com/865912Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50577}
parent bddfee98
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# Flags of x64,ignition: # Flags of x64,ignition:
--abort_on_stack_or_string_length_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --random-seed 12345 --turbo-filter=~ --noopt --suppress-asm-messages --abort_on_stack_or_string_length_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --random-seed 12345 --turbo-filter=~ --noopt --suppress-asm-messages
# Flags of x64,ignition_turbo: # Flags of x64,ignition_turbo:
--abort_on_stack_or_string_length_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --random-seed 12345 --suppress-asm-messages --abort_on_stack_or_string_length_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --random-seed 12345 --suppress-asm-messages --stress-scavenge=100
# #
# Difference: # Difference:
- unknown - unknown
......
...@@ -12,6 +12,7 @@ import hashlib ...@@ -12,6 +12,7 @@ import hashlib
import itertools import itertools
import json import json
import os import os
import random
import re import re
import sys import sys
import traceback import traceback
...@@ -75,6 +76,14 @@ CONFIGS = dict( ...@@ -75,6 +76,14 @@ CONFIGS = dict(
], ],
) )
# Additional flag experiments. List of tuples like
# (<likelihood to use flags in [0,1)>, <flag>).
ADDITIONAL_FLAGS = [
(0.05, '--stress-marking=100'),
(0.05, '--stress-scavenge=100'),
(0.05, '--stress-compaction-random'),
]
# Timeout in seconds for one d8 run. # Timeout in seconds for one d8 run.
TIMEOUT = 3 TIMEOUT = 3
...@@ -247,6 +256,7 @@ def fail_bailout(output, ignore_by_output_fun): ...@@ -247,6 +256,7 @@ def fail_bailout(output, ignore_by_output_fun):
def main(): def main():
options = parse_args() options = parse_args()
rng = random.Random(options.random_seed)
# Suppressions are architecture and configuration specific. # Suppressions are architecture and configuration specific.
suppress = v8_suppressions.get_suppression( suppress = v8_suppressions.get_suppression(
...@@ -267,6 +277,11 @@ def main(): ...@@ -267,6 +277,11 @@ def main():
first_config_flags = common_flags + CONFIGS[options.first_config] first_config_flags = common_flags + CONFIGS[options.first_config]
second_config_flags = common_flags + CONFIGS[options.second_config] second_config_flags = common_flags + CONFIGS[options.second_config]
# Add additional flags to second config based on experiment percentages.
for p, flag in ADDITIONAL_FLAGS:
if rng.random() < p:
second_config_flags.append(flag)
def run_d8(d8, config_flags): def run_d8(d8, config_flags):
preamble = PREAMBLE[:] preamble = PREAMBLE[:]
if options.first_arch != options.second_arch: if options.first_arch != options.second_arch:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment