-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Fix entropy repeat mode bug #2697
Conversation
I haven't looked at the PR yet, but why is this the case? Is it because the fuzzer that caught it doesn't use the advanced API, and we need to extend its coverage? |
The fuzzer that caught it is |
Could we extend it to use the advanced API 1/2 the time? E.g. the same way |
I was wrong - zstd/tests/fuzz/dictionary_round_trip.c Line 37 in 8a3bdfa
|
Do you think there is a reason why the fuzzer didn't catch it until we added the old API? Or do you think it is just random chance? |
I had investigated a bit, and it's still not really clear to me how this ends up happening, though I'll keep looking. Random chance being the reason seems somewhat unlikely since the old API is only hit with 1/16th of the frequency, and the old API only uses block splitter with high compression levels. |
Fixes a bug from OSS-Fuzz that occurs in the block splitter: the change to the
blockState
entropy repeat mode was erroneously happening beforeZSTD_blockState_confirmRepcodesAndEntropyTables()
and would get overwritten.Testing - this was never caught by the OSS fuzzer when it was running on the advanced API. But it was caught within a few days of adding block splitter to the old API fuzzers.