Skip to content

fuzzing: make ossfuzz.sh resilient to individual compile failures#1

Open
tc-agent wants to merge 1 commit into
mainfrom
fix/ossfuzz-build-resilience
Open

fuzzing: make ossfuzz.sh resilient to individual compile failures#1
tc-agent wants to merge 1 commit into
mainfrom
fix/ossfuzz-build-resilience

Conversation

@tc-agent

Copy link
Copy Markdown
Owner

Summary

The OSS-Fuzz build for glaze has been broken since 2025-12-18 (last successful build) because Clang 22 (adopted by OSS-Fuzz around that time) segfaults when compiling fuzzing/msgpack_roundtrip_string.cpp.

The crash occurs during template instantiation of the msgpack write path for std::string — specifically in TransformNestedNameSpecifierLoc during C++23 concept constraint evaluation. This is a compiler bug, not a code bug.

Root Cause

ossfuzz.sh uses set -eux, which causes the entire build to abort when a single compilation fails. All 18 other fuzz harnesses compile fine on Clang 22 and were being silently skipped due to this one crash.

Fix

Remove -e from set -eux and wrap each compilation in an if/else block so that individual failures are logged as warnings but do not abort the build. A final check exits non-zero only if zero fuzzers were built, preserving the invariant that a completely broken build is still an error.

This unblocks OSS-Fuzz and restores fuzzing coverage for the 18 harnesses that compile correctly. Fuzz Introspector reports 53.81% (3,772/7,010 lines) from the last successful build in December 2025.

Clang 22 (used by OSS-Fuzz since ~Dec 2025) has a compiler bug that
segfaults when instantiating templates for msgpack_roundtrip_string.cpp.
The set -e in ossfuzz.sh caused the entire build to abort on this single
failure, leaving all other working fuzzers unbuilt.

Remove -e from set -eux and wrap each compile in an if/else block so that
a single compilation failure is logged as a warning but does not abort the
build. Add a final check that exits non-zero only if zero fuzzers were built,
preserving the invariant that a completely broken build is still an error.

This unblocks the OSS-Fuzz build, which has been failing since 2025-12-18
(last successful build ID: 51ac6718-86c6-44f0-93c3-700557ee939c).
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