Repository navigation
huff0: seed FuzzDecompress1x with real compressed output, exercise Decompress4X - #1208
Conversation
…compress4X Ports the part of klauspost#893 that never shipped: ReturnFromZip already landed separately and is used by s2's decoder fuzzers the same way. FuzzCompress already round-trips through Compress4X/Decompress4X; FuzzDecompress1x did not, and only saw whatever ReadTable happened to accept from a raw zip, never well-formed tables+payloads from the real encoder. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe fuzz tests add regression corpus seeds for compression and decompression. Decompression seeds use outputs from both ChangesHuff0 fuzzing
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This expands Huff0 fuzz inputs and exercises both decompression variants without changing production behavior. No actionable merge risk is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@lizthegrey I've been wanting to do a larger fuzzing refactor for a while to slim down the base corpus, but have a more complete corpus being opt-in remotely fetched from github for example. I will see if I can find the bandwidth to throw some tokens at a framework. |
Summary
Small rebase of the still-open #893. Most of that PR has already shipped independently:
internal/fuzz.ReturnFromZipis already on master and is used bys2/fuzz_test.goto seed decoder fuzzers from real encoder output, andFuzzCompressalready round-trips throughCompress1X/Decompress1X/Compress4X/Decompress4X. What's left, and still missing on master:FuzzCompressnever seedstestdata/regression.zip(it still exists inhuff0/testdata/, just unused).FuzzDecompress1xonly ever saw whateverReadTablehappened to accept out of a raw zip, and never exercisedDecompress4Xat all — unlike the s2 decoder fuzzers, which seed from real compressor output viaReturnFromZip.This applies that same
addCompressed-via-ReturnFromZippattern tohuff0/fuzz_test.go, and addsDecompress4Xto the fuzzed paths.Test plan
go build ./...,go vet ./huff0/...go test ./huff0/...(seed corpus + existing tests pass)go test -fuzz=FuzzDecompress1x -fuzztime=20s ./huff0— no crashes, 112 new coverage-interesting inputs found (confirms the newDecompress4Xpath is reached)go test -fuzz=FuzzCompress -fuzztime=20s ./huff0— no crashes, 15 new coverage-interesting inputs found🤖 Generated with Claude Code
Summary by CodeRabbit