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

POC: Speed up compilation by freezing container during compilation. #11940

Merged
merged 11 commits into from
Jun 18, 2024

Commits on Jun 17, 2024

  1. POC: Speed up compilation by freezing container during compilation.

    Instead of rebuilding the entire project every time we want to compile
    a single fuzz target, a better workflow is to build the project once
    and somehow compile the target against the already compiled project
    code.
    This POC does that by interrupting building in when it detects
    it is compiling the fuzz target.
    On detection it does the following:
    1. Writes the command to /out/statefile
    TODO: write the cwd.
    2. Commits the current container as "frozen" for use later.
    TODO: make this changeable.
    3. Returns 1 so compilation stops.
    TODO: It would be better to exit the container.
    This step may be important to prevent clean up of the environment.
    
    Then the frozen container can be used to compile fuzz targets
    against the project without recompiling the project in its
    entirety.
    
    TODO:
    1. Support this in oss-fuzz-gen
    2. Install docker command line tool in base-builder (or use sneaky
    inheritance) because it must be used within the container.
    jonathanmetzman committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    30e1154 View commit details
    Browse the repository at this point in the history
  2. Move to new file

    jonathanmetzman committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    45ba341 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ce7babb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    259649a View commit details
    Browse the repository at this point in the history
  5. Get working

    jonathanmetzman committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    51bc688 View commit details
    Browse the repository at this point in the history
  6. undo

    jonathanmetzman committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    f810fe7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4def989 View commit details
    Browse the repository at this point in the history
  8. fmt

    jonathanmetzman committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    ef2ebe5 View commit details
    Browse the repository at this point in the history
  9. Fix

    jonathanmetzman committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    c936102 View commit details
    Browse the repository at this point in the history
  10. Remove AST code

    jonathanmetzman committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    af89694 View commit details
    Browse the repository at this point in the history
  11. Fix comments

    jonathanmetzman committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    35e5307 View commit details
    Browse the repository at this point in the history