fuzzing: make ossfuzz.sh resilient to individual compile failures#1
Open
tc-agent wants to merge 1 commit into
Open
fuzzing: make ossfuzz.sh resilient to individual compile failures#1tc-agent wants to merge 1 commit into
tc-agent wants to merge 1 commit into
Conversation
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).
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.
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 inTransformNestedNameSpecifierLocduring C++23 concept constraint evaluation. This is a compiler bug, not a code bug.Root Cause
ossfuzz.shusesset -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
-efromset -euxand wrap each compilation in anif/elseblock 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.