Skip to content

cpp-httplib: fix broken build#53

Open
tc-agent wants to merge 2 commits into
masterfrom
update-cpp-httplib-fuzzing
Open

cpp-httplib: fix broken build#53
tc-agent wants to merge 2 commits into
masterfrom
update-cpp-httplib-fuzzing

Conversation

@tc-agent

@tc-agent tc-agent commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

The coverage build for cpp-httplib has been failing daily since 2026-04-29 (last successful coverage build: 2026-04-28). Fuzz Introspector currently reports code coverage as N/A.

Root cause

Upstream PR yhirose/cpp-httplib#2412 (commit 831b64b, 2026-03-28) added two new fuzz targets, url_parser_fuzzer and header_parser_fuzzer, to test/fuzzing/Makefile. Unlike the existing server_fuzzer and client_fuzzer rules, the new rules do not run zip -q -r ${target}_seed_corpus.zip corpus, so no *_seed_corpus.zip is produced for the new targets.

The breakage surfaced when #15426 (commit fa7217d, 2026-04-28) switched build.sh from make -j$(nproc) server_fuzzer to make -j$(nproc) all, which started compiling all four fuzzers and triggering corpus downloads for them. ClusterFuzz has no corpus backup for the two new targets, so the coverage runner ends up with an HTML/XML error response written to /corpus/${target}.zip, unzip fails, and the build aborts with Failed to unpack the corpus for url_parser_fuzzer. Providing ${target}_seed_corpus.zip in $OUT lets the runner fall back to seed corpora when the backup is missing.

Change

In build.sh, after make all, generate the missing seed-corpus zips for url_parser_fuzzer and header_parser_fuzzer, reusing the existing test/fuzzing/corpus/ directory in the same way the upstream Makefile does for server_fuzzer / client_fuzzer. The [ -f ... ] || guard skips the zip if the upstream Makefile starts producing one.

Coverage after fix

5-minute libfuzzer/address run from seed corpora:

fuzzer line coverage
server_fuzzer 12.56% (1144 / 9106)
client_fuzzer 10.40% (920 / 8849)
header_parser_fuzzer 4.33% (390 / 9010)
url_parser_fuzzer 3.56% (321 / 9016)
merged 20.39% (1892 / 9280)

For prior-state comparison, Fuzz Introspector reports 23.85% line coverage on server_fuzzer from production fuzzing (last data 2026-04-28); the local 5-minute number is lower because the run is much shorter and starts only from the seed corpus.

@tc-agent
tc-agent force-pushed the master branch 2 times, most recently from 1161025 to c655e12 Compare May 9, 2026 05:25
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

Fuzzing Coverage Report

Tested: project cpp-httplib · base c4ba43b → head 1fd175d · 300s total fuzz budget · updated 2026-05-28 04:08 UTC · workflow run

Metric Before After Delta
Static reachability 49.2% (261/531) 49.2% (261/531) +0.0%
Line coverage 21.1% (2004/9494) 22.7% (2124/9340) +6.0%
Branch coverage 32.5% (825/2536) 31.3% (845/2698) +2.4%
Function coverage 20.7% (189/913) 21.8% (199/913) +5.3%

Per-harness

Harness Lines before Lines after Δ
client_fuzzer 9.6% (866/9041) 10.6% (958/9041) +10.6%
header_parser_fuzzer 5.5% (508/9204) 4.2% (390/9204) -23.2%
server_fuzzer 11.5% (1075/9316) 12.2% (1134/9316) +5.5%
url_parser_fuzzer 3.6% (330/9210) 2.4% (225/9210) -31.8%

Δ = (after − before) / before, to accommodate that denominators may change. "new" when before is 0; "deleted" when after is 0.

@tc-agent
tc-agent force-pushed the master branch 26 times, most recently from d39b4ee to 6779759 Compare May 13, 2026 18:37
@tc-agent
tc-agent force-pushed the master branch 12 times, most recently from 9a36aa8 to 6a4a93d Compare May 21, 2026 13:42
@tc-agent
tc-agent force-pushed the master branch 3 times, most recently from 6125235 to e512e7e Compare May 27, 2026 06:33
@tc-agent
tc-agent force-pushed the update-cpp-httplib-fuzzing branch from c599575 to fc93a1b Compare May 27, 2026 07:53
@tc-agent
tc-agent force-pushed the master branch 7 times, most recently from a7587cd to b952f62 Compare May 28, 2026 02:55
@tc-agent
tc-agent force-pushed the update-cpp-httplib-fuzzing branch from fc93a1b to 1fd175d Compare May 28, 2026 03:35
@tc-agent
tc-agent force-pushed the master branch 4 times, most recently from af7f9a7 to 806b281 Compare May 28, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant