diff options
author | jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> | 2021-03-31 06:55:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 06:55:30 -0700 |
commit | 4cc3aa63437c2b2e59c84ded347a060cc4093914 (patch) | |
tree | b1c911a8d329da0e471571f89002f8bf5ca8394c /infra | |
parent | 19ec1ffbe50fd3745973471e82b349073a867205 (diff) | |
download | oss-fuzz-4cc3aa63437c2b2e59c84ded347a060cc4093914.tar.gz |
[CIFuzz] Print crash stacktraces no matter what (#5474)
Even if we don't want to report them, print the stacktrace.
Related: https://github.com/google/oss-fuzz/issues/5461
Diffstat (limited to 'infra')
-rw-r--r-- | infra/cifuzz/fuzz_target.py | 7 | ||||
-rw-r--r-- | infra/cifuzz/run_fuzzers.py | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/infra/cifuzz/fuzz_target.py b/infra/cifuzz/fuzz_target.py index e2beebd77..c623bf60d 100644 --- a/infra/cifuzz/fuzz_target.py +++ b/infra/cifuzz/fuzz_target.py @@ -141,8 +141,14 @@ class FuzzTarget: if not testcase: logging.error(b'No testcase found in stacktrace: %s.', stderr) return FuzzResult(None, None) + + utils.binary_print(b'Fuzzer: %s. Detected bug:\n%s' % + (self.target_name.encode(), stderr)) if self.is_crash_reportable(testcase): + # We found a bug in the fuzz target and we will report it. return FuzzResult(testcase, stderr) + + # We found a bug but we won't report it. return FuzzResult(None, None) def free_disk_if_needed(self): @@ -271,7 +277,6 @@ class FuzzTarget: logging.info('The crash is reproducible. The crash doesn\'t reproduce ' 'on old builds. This code change probably introduced the ' 'crash.') - return True logging.info('The crash is reproducible on old builds ' diff --git a/infra/cifuzz/run_fuzzers.py b/infra/cifuzz/run_fuzzers.py index d00109e3e..513cfb6fa 100644 --- a/infra/cifuzz/run_fuzzers.py +++ b/infra/cifuzz/run_fuzzers.py @@ -145,10 +145,6 @@ class BaseFuzzTargetRunner: target.target_name) continue - # We found a bug in the fuzz target. - utils.binary_print(b'Fuzzer: %s. Detected bug:\n%s' % - (target.target_name.encode(), result.stacktrace)) - # TODO(metzman): Do this with filestore. testcase_artifact_path = self.get_fuzz_target_artifact( target, os.path.basename(result.testcase)) |