mirror of https://github.com/google/oss-fuzz.git
Allow projects to always upload crashes even if they are "unreportable". (#6998)
Fixes https://github.com/google/clusterfuzzlite/issues/65
This commit is contained in:
parent
545a07315f
commit
e96a5f8f40
|
@ -200,6 +200,7 @@ class RunFuzzersConfig(BaseConfig):
|
|||
|
||||
self.report_timeouts = environment.get_bool('REPORT_TIMEOUTS', False)
|
||||
self.report_ooms = environment.get_bool('REPORT_OOMS', True)
|
||||
self.upload_all_crashes = environment.get_bool('UPLOAD_ALL_CRASHES', False)
|
||||
|
||||
# TODO(metzman): Fix tests to create valid configurations and get rid of
|
||||
# CIFUZZ_TEST here and in presubmit.py.
|
||||
|
|
|
@ -184,15 +184,17 @@ class FuzzTarget: # pylint: disable=too-many-instance-attributes
|
|||
crash = result.crashes[0]
|
||||
logging.info('Fuzzer: %s. Detected bug.', self.target_name)
|
||||
|
||||
if self.is_crash_reportable(crash.input_path,
|
||||
crash.reproduce_args,
|
||||
batch=batch):
|
||||
# We found a bug in the fuzz target and we will report it.
|
||||
saved_path = self._save_crash(crash)
|
||||
return FuzzResult(saved_path, result.logs, self.latest_corpus_path)
|
||||
is_reportable = self.is_crash_reportable(crash.input_path,
|
||||
crash.reproduce_args,
|
||||
batch=batch)
|
||||
if is_reportable or self.config.upload_all_crashes:
|
||||
fuzzer_logs = result.logs
|
||||
testcase_path = self._save_crash(crash)
|
||||
else:
|
||||
fuzzer_logs = None
|
||||
testcase_path = None
|
||||
|
||||
# We found a bug but we won't report it.
|
||||
return FuzzResult(None, None, self.latest_corpus_path)
|
||||
return FuzzResult(testcase_path, fuzzer_logs, self.latest_corpus_path)
|
||||
|
||||
def free_disk_if_needed(self, delete_fuzz_target=True):
|
||||
"""Deletes things that are no longer needed from fuzzing this fuzz target to
|
||||
|
|
|
@ -136,7 +136,7 @@ class BaseFuzzTargetRunner:
|
|||
|
||||
fuzzers_left_to_run -= 1
|
||||
if not result.testcase or not result.stacktrace:
|
||||
logging.info('Fuzzer %s finished running without crashes.',
|
||||
logging.info('Fuzzer %s finished running without reportable crashes.',
|
||||
target.target_name)
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in New Issue