Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Pause compile just before compiling the fuzz target so that we can reuse it later. #11937

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DonggeLiu
Copy link
Contributor

@DonggeLiu DonggeLiu commented May 10, 2024

@jonathanmetzman proposed a great idea about saving the machine state just before compiling the fuzz target so that we can compile different fuzz targets from that state later without having to go through the earlier commands.
This is particularly beneficial for OSS-Fuzz-Gen.

This PR is an (incomplete) PoC at that.
Ideally, we:

  1. Replace the fuzz target compilation command and all commands after it with no-ops,
  2. Save them into a script (e.g., $SRC/re-run.sh), and
  3. Push the resulting image for later reuse.

In this way, we can reuse the image later by swapping the fuzz target source code and executing $SRC/re-run.sh.

The script in the PR can do 2, but not 1.
This might be OK already because steps in 1 are normally at the end, and there is unlikely any check to prevent them, but ideally, we should do 1, too.

To test this locally:

python infra/helper.py build_image libiec61850
docker run -ti --entrypoint=/bin/bash gcr.io/oss-fuzz/libiec61850
(in container) compile
cat /src/re-run.sh

Copy link

DonggeLiu has previously contributed to projects/libiec61850. The previous PR was #10109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant