diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-06-02 06:07:19 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-06-02 06:07:19 (GMT) |
commit | b636779b0e168c346b42e85af816ce37a8ed9880 (patch) | |
tree | 03c4d8882c25162102c6df6e46b238a5864ed77b /programs | |
parent | 302e7e2f2bddc4a9d1ff108c0d9a5079a11b6ed0 (diff) | |
download | lz4-b636779b0e168c346b42e85af816ce37a8ed9880.zip lz4-b636779b0e168c346b42e85af816ce37a8ed9880.tar.gz lz4-b636779b0e168c346b42e85af816ce37a8ed9880.tar.bz2 |
unified structure model
Diffstat (limited to 'programs')
-rwxr-xr-x | programs/fullbench.c | 4 | ||||
-rw-r--r-- | programs/fuzzer.c | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/programs/fullbench.c b/programs/fullbench.c index ef42c80..ae33330 100755 --- a/programs/fullbench.c +++ b/programs/fullbench.c @@ -300,10 +300,10 @@ static int local_LZ4_compress_limitedOutput_usingDict(const char* in, char* out, return LZ4_compress_limitedOutput_usingDict(&LZ4_dict, in, out, inSize, LZ4_compressBound(inSize)); } -int LZ4_compress_forceDict (LZ4_dict_t* LZ4_dict, const char* source, char* dest, int inputSize); +int LZ4_compress_forceExtDict (LZ4_dict_t* LZ4_dict, const char* source, char* dest, int inputSize); static int local_LZ4_compress_forceDict(const char* in, char* out, int inSize) { - return LZ4_compress_forceDict(&LZ4_dict, in, out, inSize); + return LZ4_compress_forceExtDict(&LZ4_dict, in, out, inSize); } diff --git a/programs/fuzzer.c b/programs/fuzzer.c index 4b19703..56208d3 100644 --- a/programs/fuzzer.c +++ b/programs/fuzzer.c @@ -410,7 +410,14 @@ int FUZ_test(U32 seed, int nbCycles, int startCycle, double compressibility) { ret = LZ4_decompress_fast_withPrefix64k(compressedBuffer, decodedBuffer+dictSize, blockSize); FUZ_CHECKTEST(ret!=blockContinueCompressedSize, "LZ4_decompress_fast_withPrefix64k did not read all compressed block input"); crcCheck = XXH32(decodedBuffer+dictSize, blockSize, 0); - FUZ_CHECKTEST(crcCheck!=crcOrig, "LZ4_decompress_fast_withPrefix64k corrupted decoded data"); + if (crcCheck!=crcOrig) + { + int i=0; + while (block[i]==decodedBuffer[i]) i++; + printf("Wrong Byte at position %i/%i\n", i, blockSize); + + } + FUZ_CHECKTEST(crcCheck!=crcOrig, "LZ4_decompress_fast_withPrefix64k corrupted decoded data (dict %i)", dictSize); FUZ_DISPLAYTEST; ret = LZ4_decompress_safe_withPrefix64k(compressedBuffer, decodedBuffer+dictSize, blockContinueCompressedSize, blockSize); @@ -453,7 +460,7 @@ int FUZ_test(U32 seed, int nbCycles, int startCycle, double compressibility) { printf("Wrong Byte at position %i/%i\n", i, blockSize); } - FUZ_CHECKTEST(crcCheck!=crcOrig, "LZ4_decompress_fast_usingDict corrupted decoded data"); + FUZ_CHECKTEST(crcCheck!=crcOrig, "LZ4_decompress_fast_usingDict corrupted decoded data (dict %i)", dictSize); FUZ_DISPLAYTEST; decodedBuffer[blockSize] = 0; |