ci: nightly libFuzzer targets for the byte-facing parsers - #64
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four libFuzzer harnesses over the parsers that eat network bytes, with oracles (not just no-crash):
parse_traceparent(canonical output + format→parse round-trip),parse_decimal_to_cents(exact cents round-trip), config placeholder expansion (deterministic env), public-path matching + metrics path normalization (rooted, idempotent). Built-fsanitize=fuzzer,address,undefined -fno-sanitize-recover=all, curated seed corpora.The clang-vs-vcpkg problem solved honestly: fuzzers never link app_core or see the vcpkg toolchain. The fuzzed parsers were split into std-only TUs by verbatim moves (
TraceOtelout of Trace,PayPalParseout of the curl TU,ConfigExpandfree functions,PathNormalizeout of the drogon header) — the nightly needs onlyapt install clang nlohmann-json3-dev. Docs frame this as a tripwire: a fuzzed parser regaining heavy includes breaks the fuzz build by design. Top-level CMake diff is inert atENABLE_FUZZERS=OFF..github/workflows/fuzz-nightly.yml: nightly cron + dispatch (seconds_per_target), growing corpus in actions/cache (saved even on crash viaif: always()+ run-id keys), crash ⇒ red job + reproducer artifact.Proven locally: full fuzz CMake configure+build under clang 17; all four targets ran 15 s each (0.6M–7.4M execs, zero findings); every touched TU clang-syntax-checks; all gates + selftest 19/19 + clang-format dry-run clean. GCC/vcpkg linker truth for the verbatim splits = this CI run; a
workflow_dispatchof Fuzz nightly right after merge is the follow-through.