Commit 4ecc4c8
feat: Fuzz Infrastructure Setup (TASK-500) (#98)
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>1 parent 09b861d commit 4ecc4c8
70 files changed
Lines changed: 1506 additions & 15 deletions
File tree
- corpus
- event
- hpack
- http1_response
- http2_frame
- scenario
- scripts
- src
- tests/fuzz
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
437 | 488 | | |
438 | 489 | | |
439 | 490 | | |
| |||
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments