oss-fuzz icon indicating copy to clipboard operation
oss-fuzz copied to clipboard

[pem] Fix Broken Build & Improve Fuzz Harness

Open DaveLak opened this issue 1 year ago • 2 comments

Fix Issue 70805: pem: Fuzzing build failure

Fixes broken fuzzer builds that have been failing since Jul 30, 2024.

Key Changes:

  • Pyinstaller Upgrade: Updated Pyinstaller to version 3.10.0, which is the minimum version supporting setuptools >= 71.0.0. This upgrade addresses the build failures caused by the new dependency vendoring approach in setuptools.
  • Dictionary Addition: Added a dictionary for setuptools fuzz harnesses.
  • Fuzzer Optimization: Improved fuzzer cold-start time by using atheris.instrument_imports instead of atheris.instrument_all. This significantly speeds up the time it takes for the fuzzer to start running.

DaveLak avatar Aug 13 '24 13:08 DaveLak

DaveLak is a new contributor to projects/pem. The PR must be approved by known contributors before it can be merged.

github-actions[bot] avatar Aug 13 '24 13:08 github-actions[bot]

@DavidKorczynski Could you please double-check this? Thanks :)

DonggeLiu avatar Aug 27 '24 02:08 DonggeLiu

just to clarify here I don't think this improved the harness? Just changed the way instrumentation happens?

DavidKorczynski avatar Aug 28 '24 19:08 DavidKorczynski

The dictionary is a bit much perhaps because it's a very small target

Thanks for the feedback. It's a pattern that I've applied elsewhere and I added it here without much additional consideration, but I can see how it might be overkill in this context.

I'll avoid overcomplicating small targets in the future.

just to clarify here I don't think this improved the harness? Just changed the way instrumentation happens?

You're right, the PR title could have been clearer. The harness itself wasn't improved; the change was about optimizing the instrumentation step to improve startup time.

DaveLak avatar Aug 28 '24 19:08 DaveLak