[CIFuzz] Add seed and len control to fuzzer arguments (#3321)

This commit is contained in:
Leo Neat 2020-02-04 10:54:28 -08:00 committed by GitHub
parent 43121ce034
commit da04f5e431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import subprocess
import sys
# pylint: disable=wrong-import-position
# pylint: disable=import-error
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import utils
@ -27,6 +28,8 @@ logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.DEBUG)
LIBFUZZER_OPTIONS = '-seed=1337 -len_control=0'
class FuzzTarget:
"""A class to manage a single fuzz target.
@ -72,7 +75,8 @@ class FuzzTarget:
command += [
'-e', 'FUZZING_ENGINE=libfuzzer', '-e', 'SANITIZER=address', '-e',
'RUN_FUZZER_MODE=interactive', 'gcr.io/oss-fuzz-base/base-runner',
'bash', '-c', 'run_fuzzer {0}'.format(self.target_name)
'bash', '-c', 'run_fuzzer {fuzz_target} {options}'.format(
fuzz_target=self.target_name, options=LIBFUZZER_OPTIONS)
]
logging.info('Running command: %s', ' '.join(command))
process = subprocess.Popen(command,