feat: Fuzz Infrastructure Setup (TASK-500)#98
Merged
copyleftdev merged 1 commit intomainfrom Jan 11, 2026
Merged
Conversation
Comprehensive fuzz testing infrastructure for parser robustness: - Created 4 new fuzz test files for HTTP/1.1, HTTP/2, HPACK, and Scenario parsers - Added 60+ corpus seed files across 5 target directories (http1_response, http2_frame, hpack, scenario, event) - Implemented fuzz-targets build step in build.zig - Added scripts/run-fuzz.sh for running fuzz tests - Added scripts/minimize-corpus.sh for corpus management (placeholder) - Fixed parser assertions that caused crashes during fuzzing: - HPACK decodeString: removed assertion, use error return for empty input - HTTP/2 parseHeader: moved assertion after input validation - Exported HTTP2_MAX_FRAME_SIZE constant from z6.zig Test results: - HPACK decoder: 6/6 tests pass, 1M iterations - HTTP/2 frame: 5/5 tests pass, 1M iterations Note: HTTP/1.1, Scenario, and Event fuzz tests have pre-existing Zig 0.14 API compatibility issues (ArrayList.deinit signature) in the main codebase that need separate fixes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
Changes
New Files
tests/fuzz/http1_parser_fuzz.zig- HTTP/1.1 parser fuzz tests (5 tests, 1M+ iterations)tests/fuzz/http2_frame_fuzz.zig- HTTP/2 frame parser fuzz tests (5 tests, 1M iterations)tests/fuzz/hpack_decoder_fuzz.zig- HPACK decoder fuzz tests (6 tests, 1M iterations)tests/fuzz/scenario_parser_fuzz.zig- Scenario parser fuzz tests (5 tests, 100k iterations)scripts/run-fuzz.sh- Script to run all fuzz targetsscripts/minimize-corpus.sh- Placeholder for corpus managementcorpus/- Seed files for all fuzz targetsBug Fixes
Build System
fuzz-targetsbuild step with all fuzz test targetsHTTP2_MAX_FRAME_SIZEconstant from z6.zigTest Results
Note: HTTP/1.1, Scenario, and Event tests are blocked by pre-existing Zig 0.14 ArrayList API compatibility issues in the main codebase that need separate fixes.
Test plan
zig build fuzz-targetsworksCloses #64
🤖 Generated with Claude Code