Skip to content

libgit2: fix broken build#68

Open
tc-agent wants to merge 2 commits into
masterfrom
libgit2-fix-broken-build
Open

libgit2: fix broken build#68
tc-agent wants to merge 2 commits into
masterfrom
libgit2-fix-broken-build

Conversation

@tc-agent

Copy link
Copy Markdown
Owner

The OSS-Fuzz build for libgit2 has been failing since 2026-05-08 (see the
build status index
for last_successful_build.finish_time). The Fuzz Introspector profile
reflects this — no recent fuzzer or coverage build is available
(profile).
The last successful coverage build (2026-05-08) reports 21.86% line coverage
(report).

Two latent problems in build.sh's hand-rolled compile invocation needed
addressing:

  1. -I./include/git2 was on the compiler include path. libgit2 ships a
    Visual Studio compatibility shim at
    include/git2/stdint.h
    (a no-op outside _MSC_VER); with that directory on the include path
    the system <inttypes.h> resolves its #include <stdint.h> to the
    shim instead of clang's, leaving uintmax_t / uint64_t / uint32_t
    undefined and failing the fuzzer-side compile with "unknown type name
    'uintmax_t'". Removing the flag restores the system header search.

  2. libgit2's CMake configures git2_features.h (and experimental.h) into
    \${PROJECT_BINARY_DIR}/gen_headers/ — see
    src/util/CMakeLists.txt
    and
    src/libgit2/CMakeLists.txt;
    the in-tree libgit2 build references them via LIBGIT2_INCLUDES, but
    build.sh did not have that directory on its own include path. Adding
    -I./gen_headers makes the configured headers visible to the fuzzer
    compile step.

After the fix, fuzzer compilation completes cleanly, all eight existing
fuzz targets build, and the coverage build returns to the pre-break level
documented in the 2026-05-08 report linked above (21.86% lines).

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown

Fuzzing Coverage Report

Tested: project libgit2 · base 2de60f9 → head 9573093 · 300s total fuzz budget · updated 2026-05-27 20:58 UTC · workflow run

Metric Before After Delta
Static reachability 8.9% (1012/11333) 22.8% (1002/4396) +13.9%
Line coverage 0% 19.0% (16816/88283) new
Branch coverage 0% 16.6% (8863/53382) new
Function coverage 0% 23.1% (989/4284) new

Per-harness

Harness Lines before Lines after Δ
commit_graph_fuzzer 0% 1.8% (1575/86806) new
config_file_fuzzer 0% 1.9% (1688/87078) new
download_refs_fuzzer 0% 9.1% (7946/86856) new
midx_fuzzer 0% 1.8% (1550/86802) new
objects_fuzzer 0% 2.4% (2107/86780) new
packfile_fuzzer 0% 4.2% (3651/86962) new
patch_parse_fuzzer 0% 1.9% (1630/87532) new
revparse_fuzzer 0% 12.4% (10745/86780) new

Δ = (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 2 times, most recently from b5fd10c to 712a52f Compare May 27, 2026 16:16
@tc-agent
tc-agent force-pushed the libgit2-fix-broken-build branch from f4230c6 to 9573093 Compare May 27, 2026 20:14
@tc-agent
tc-agent force-pushed the master branch 6 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant