Skip to content

fuzz, brainstorm: Individual binaries per harness #28971

@dergoegge

Description

@dergoegge

I would like to propose splitting up our fuzz binary into one binary per fuzz harness (or at least have an option to build separate binaries). This would primarily enable properly compiling with LTO, which would have several benefits:

The only downside would be that linking multiple binaries is slower (this was the only reason for switching to compiling only one binary), but I think we can work around this by simply making this optional.

To achieve this we would need to:

  1. Change the build system to have an option to compile individual binaries
  2. Change the fuzzing framework to (optionally) have FUZZ_TARGET include the actual fuzz entry point directly (e.g. LLVMFuzzerTestOneInput) instead of accumulating all harness functions into a global map
    • This probably requires splitting each harness into its own file

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions