]> git.ipfire.org Git - thirdparty/zstd.git/commit
[zstdmt] Fix jobsize bugs (#1205)
authorNick Terrell <nickrterrell@gmail.com>
Mon, 25 Jun 2018 22:21:08 +0000 (15:21 -0700)
committerGitHub <noreply@github.com>
Mon, 25 Jun 2018 22:21:08 +0000 (15:21 -0700)
commitb426bcc097355d82002d8bc7f531de7292384ceb
treee5587aadbf0b5f31651a623cfadb0e9aa88dcb09
parent3b53bfe4f3f0a9bcc4f9be014b83896a370ba5ff
[zstdmt] Fix jobsize bugs (#1205)

[zstdmt] Fix jobsize bugs

* `ZSTDMT_serialState_reset()` should use `targetSectionSize`, not `jobSize` when sizing the seqstore.
  Add an assert that checks that we sized the seqstore using the right job size.
* `ZSTDMT_compressionJob()` should check if `rawSeqStore.seq == NULL`.
* `ZSTDMT_initCStream_internal()` should not adjust `mtctx->params.jobSize` (clamping to MIN/MAX is okay).
lib/compress/zstdmt_compress.c
lib/compress/zstdmt_compress.h
tests/zstreamtest.c