zstd/tests/cli-tests/compression
Nick Terrell 395a2c5462 [bug-fix] Fix rare corruption bug affecting the block splitter
The block splitter confuses sequences with literal length == 65536 that use a
repeat offset code. It interprets this as literal length == 0 when deciding the
meaning of the repeat offset, and corrupts the repeat offset history. This is
benign, merely causing suboptimal compression performance, if the confused
history is flushed before the end of the block, e.g. if there are 3 consecutive
non-repeat code sequences after the mistake. It also is only triggered if the
block splitter decided to split the block.

All that to say: This is a rare bug, and requires quite a few conditions to
trigger. However, the good news is that if you have a way to validate that the
decompressed data is correct, e.g. you've enabled zstd's checksum or have a
checksum elsewhere, the original data is very likely recoverable. So if you were
affected by this bug please reach out.

The fix is to remind the block splitter that the literal length is actually 64K.
The test case is a bit tricky to set up, but I've managed to reproduce the issue.

Thanks to @danlark1 for alerting us to the issue and providing us a reproducer!
2023-02-23 10:54:31 -08:00
..
adapt.sh [fileio] Separate parameter adaption from display update rate 2022-12-14 17:08:21 -08:00
basic.sh fix cli-tests issues 2023-02-14 11:33:26 -08:00
compress-literals.sh [test] Add new CLI testing platform 2022-01-27 13:56:59 -08:00
format.sh [CI] Hook cli-tests up to CI 2022-01-27 13:56:59 -08:00
golden.sh [bug-fix] Fix rare corruption bug affecting the block splitter 2023-02-23 10:54:31 -08:00
gzip-compat.sh fix cli-tests issues 2023-02-14 11:33:26 -08:00
levels.sh change logic when stderr is not console : don't update progress status 2023-01-26 13:00:52 -08:00
levels.sh.stderr.exact change logic when stderr is not console : don't update progress status 2023-01-26 13:00:52 -08:00
long-distance-matcher.sh [test] Add new CLI testing platform 2022-01-27 13:56:59 -08:00
multi-threaded.sh change logic when stderr is not console : don't update progress status 2023-01-26 13:00:52 -08:00
multi-threaded.sh.stderr.exact change logic when stderr is not console : don't update progress status 2023-01-26 13:00:52 -08:00
multiple-files.sh stdin multiple file fixes (#3222) 2022-07-29 16:13:07 -07:00
multiple-files.sh.stdout.exact stdin multiple file fixes (#3222) 2022-07-29 16:13:07 -07:00
row-match-finder.sh [test] Add new CLI testing platform 2022-01-27 13:56:59 -08:00
setup [test] Add new CLI testing platform 2022-01-27 13:56:59 -08:00
stream-size.sh [test] Add new CLI testing platform 2022-01-27 13:56:59 -08:00
verbose-wlog.sh fix issue #3144 (#3226) 2022-08-04 13:51:14 -07:00
verbose-wlog.sh.stderr.glob fix issue #3144 (#3226) 2022-08-04 13:51:14 -07:00
verbose-wlog.sh.stdout.glob fix issue #3144 (#3226) 2022-08-04 13:51:14 -07:00
window-resize.sh fix cli-tests issues 2023-02-14 11:33:26 -08:00
window-resize.sh.stderr.ignore use .ignore for stderr output in window-resize test case 2022-12-13 13:52:54 -08:00
window-resize.sh.stdout.glob added test to cli-tests 2022-12-13 12:45:41 -08:00