sketches-go
sketches-go copied to clipboard
Add fuzz test
What does this PR do?
This PR adds a fuzz test (and a regression test with its first crash.
Motivation
Helps to make sure sketches-go doesn't panic on any payload.
Additional Notes
The regression test will try to allocate a huge amount of memory, and fail / crash trying. And because it's a runtime panic, as far as I can tell, you can't recover from it.
=== RUN TestRegression
fatal error: runtime: out of memory
You can run the fuzzer locally, go test -fuzz=FuzzDecodeDDSketch -run=FuzzDecodeDDSketch
Associated Issue