1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

[lib] Ensure that multithreaded compression always makes some progress

This commit is contained in:
Nick Terrell
2020-12-03 20:25:14 -08:00
parent a6ee1b3047
commit 4c58cb8383
2 changed files with 22 additions and 5 deletions

View File

@ -2299,6 +2299,7 @@ static int fuzzerTests_newAPI(U32 seed, int nbTests, int startTest,
/* Ensure maximal forward progress for determinism */
forwardProgress = (inBuff.pos != ipos) || (outBuff.pos != opos);
} while (forwardProgress);
assert(inBuff.pos == inBuff.size);
XXH64_update(&xxhState, srcBuffer+srcStart, inBuff.pos);
memcpy(copyBuffer+totalTestSize, srcBuffer+srcStart, inBuff.pos);