CFLite: Logging fixes. (#6715)

Don't output stacktrace again in detected bug log message.

Disable Python buffering to avoid log interleaving issues.
This commit is contained in:
Oliver Chang 2021-11-02 16:50:59 +11:00 committed by GitHub
parent e9109e929b
commit ef0e5413c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,8 @@ RUN python3 -m pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt
ADD . ${OSS_FUZZ_ROOT}
RUN npm install ${OSS_FUZZ_ROOT}/infra/cifuzz
ENV PYTHONUNBUFFERED=1
# Python file to execute when the docker container starts up.
# We can't use the env var $OSS_FUZZ_ROOT here. Since it's a constant env var,
# just expand to '/opt/oss-fuzz'.

View File

@ -177,8 +177,7 @@ class FuzzTarget: # pylint: disable=too-many-instance-attributes
# Only report first crash.
crash = result.crashes[0]
logging.info('Fuzzer: %s. Detected bug:\n%s', self.target_name,
crash.stacktrace)
logging.info('Fuzzer: %s. Detected bug.', self.target_name)
if self.is_crash_reportable(crash.input_path):
# We found a bug in the fuzz target and we will report it.