Skip to content

Add fuzz harnesses for parseDerivaton and parseDump#15865

Draft
xokdvium wants to merge 1 commit into
masterfrom
fuzzer-harnesses-initial
Draft

Add fuzz harnesses for parseDerivaton and parseDump#15865
xokdvium wants to merge 1 commit into
masterfrom
fuzzer-harnesses-initial

Conversation

@xokdvium
Copy link
Copy Markdown
Contributor

@xokdvium xokdvium commented May 15, 2026

Motivation

My very WIP tree with fuzzers for the derivation and NAR parsers. Put up for visibility motivated by #15864.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@xokdvium
Copy link
Copy Markdown
Contributor Author

For this to work I build with -b_sanitize=undefined,address,fuzzer-no-link (as described in debugging.md).

@asymmetric
Copy link
Copy Markdown
Contributor

Just for reference, these are the steps I had to follow:

nix develop .#native-clangStdenv
appendToVar mesonFlags "-Db_sanitize=address,undefined,fuzzer-no-link"
appendToVar mesonFlags "-Dlibexpr:gc=disabled"
configurePhase
buildPhase

Then the two fuzz targets can be run with eg

src/libutil-tests/fuzz/nix-meson-build-support/fuzz/fuzz-parse-dump ../src/libutil-tests/fuzz/data/parse-dump/

Maybe we can start gathering this in a fuzzing-specific document. The information is all there, but spread across a couple of documents currently.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants