Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make zdb_decompress_block check its decompression reliably
This function decompresses to two buffers and then compares them to check whether the (opaque) decompression process filled the whole buffer. Previously it began with lbuf uninitialized and lbuf2 filled with pseudorandom data. This neither guarantees that any bytes not written by the compressor would be different, nor seems incredibly sound otherwise! After these changes, instead of filling one buffer with generated pseudorandom data we overwrite each buffer with completely different data. This should remove the possibility of low-probability failures, as well as make the process simpler and cheaper. Signed-off-by: Kent Ross <[email protected]>
- Loading branch information