10656 Commits
Author SHA1 Message Date
Nick TerrellandGitHub 188311dd4a Merge pull request #1736 from terrelln/fuzz-fix
[fuzz] Improve fuzzer build script and docs
2019-08-21 10:09:38 -07:00
Carl Woffenden 901ea61f83 Tweaks to create a single-file decoder
The CHECK_F macros differ slightly (but eventually do the same thing). Older GCC needs to fallback on the old-style pragma optimisation flags.
2019-08-21 17:49:17 +02:00
Yann ColletandGitHub 69c875a0cc Merge pull request #1724 from facebook/blockSize
clarifications on field `Block_Size`
2019-08-21 05:19:43 -07:00
Yann ColletandGitHub 38b6428fcd Merge pull request #1725 from emaste/dev
remove extraneous doubled ;s
2019-08-21 05:19:30 -07:00
Yann ColletandGitHub fe0877c664 Merge pull request #1721 from facebook/seq127
fixed very minor inefficiency (nbSeq==127)
2019-08-21 05:19:12 -07:00
Yann ColletandGitHub 757ab66879 Merge pull request #1713 from cemeyer/fix_gcc4_build
Fix the build on GCC 4.x after 812e8f2a1
2019-08-21 05:17:42 -07:00
Nick Terrell 07f22d465d [legacy] Fix buffer overflow in v0.2 and v0.4 raw literals decompression
Extends the fix in PR#1722 to v0.2 and v0.4. These aren't built into
zstd by default, and v0.5 onward are not affected.

I only add the `srcSize > BLOCKSIZE` check to v0.4 because the comments
say that it must hold, but the equivalent comment isn't present in v0.2.

Credit to OSS-Fuzz.
2019-08-20 17:13:04 -07:00
Nick Terrell 3982935aef [fuzz] Improve fuzzer build script and docs
* Remove the `make libFuzzer` target since it is broken and obsoleted
  by `CC=clang CXX=clang++ ./fuzz.py build all --enable-fuzzer`. The
  new `-fsanitize=fuzzer` is much better because it works with MSAN
  by default.
* Improve the `./fuzz.py gen` command by making the input type explicit
  when creating a new target.
* Update the `README` for `--enable-fuzzer`.

Fixes #1727.
2019-08-20 16:44:50 -07:00
Nick Magerko 05d7479a50 Document --size-hint 2019-08-20 14:08:26 -07:00
Nick Magerko de6a6c7364 Fix ZSTD_SRCSIZEHINT_MIN typo 2019-08-20 13:07:51 -07:00
Nick Magerko c7a24d7a14 Define ZSTD_SRCSIZEHINT_MIN as 0 2019-08-20 13:06:15 -07:00
Nick Magerko f23402f1f5 Remove unnecessary test case 2019-08-19 17:20:46 -07:00
Nick Magerko 294f1e5cfe Fix typo in test 2019-08-19 16:53:02 -07:00
Nick Magerko 83076ab277 Revert change to zstd manual 2019-08-19 16:50:26 -07:00
Nick Magerko 2d39b43906 Use int for srcSizeHint when sensible 2019-08-19 16:49:25 -07:00
Nick Magerko f9af70ca8a Fix playTests and add additional cases 2019-08-19 16:48:35 -07:00
Nick Magerko ea9d35922c Add size-hint to fuzz tests 2019-08-19 15:12:29 -07:00
Felix HandteandGitHub a3d655d225 v1.4.3: Merge pull request #1730 from facebook/dev v1.4.3 2019-08-19 16:48:01 -04:00
Nick Magerko 09894dc2eb Add mention of regression with poor size hints 2019-08-19 13:41:36 -07:00
Nick Magerko fee8fbcddf Make upper bound INT_MAX 2019-08-19 12:58:54 -07:00
Nick Magerko edf2abf106 Fix fall-through case 2019-08-19 12:32:43 -07:00
Nick Magerko dffbac5f89 Add --size-hint=# option 2019-08-19 11:38:49 -07:00
Nick Magerko 30bfa228e8 Keep content size flag set in stream size mode 2019-08-19 11:20:28 -07:00
Nick Magerko a24dc3a935 Remove extraneous variables 2019-08-19 11:14:56 -07:00
Nick Magerko f781cf672b Remove extraneous parameter 2019-08-19 11:07:43 -07:00
Nick Magerko bbd83c2ab3 Update man page 2019-08-19 09:11:22 -07:00
Nick Magerko c403b12f9d Set pledged size just before compression 2019-08-19 09:01:31 -07:00
Yann Collet 97bb38635c number instead of nb
suggested by @terrelln
2019-08-17 08:04:42 +02:00
Nick Magerko 85d07c6c47 Tweak stdout, stderr redirection in new playTests 2019-08-16 12:49:21 -07:00
Nick Magerko af0c9501d1 Add --stream-size=# command 2019-08-16 11:34:39 -07:00
Yann Collet 1e07eb4d5c clarifications on the meaning of field Block_Size
following comments from Intel's Smita Kumar.
2019-08-16 15:15:25 +02:00
Ed Maste b81d7cc6a0 remove extraneous doubled ;s 2019-08-15 21:17:06 -04:00
Felix HandteandGitHub c9072ee674 Merge pull request #1722 from felixhandte/legacy-decompression-fix
Fix Buffer Overflow in Legacy (v0.3) Raw Literals Decompression
2019-08-15 15:55:46 -04:00
W. Felix Handte d6f31e1c38 Add to CHANGELOG for Upcoming Release 2019-08-15 14:42:38 -04:00
W. Felix Handte a42bbb4e05 Fix Buffer Overflow in Legacy (v0.3) Raw Literals Decompression 2019-08-15 14:28:30 -04:00
Yann Collet 782bfb858a fixed very minor inefficiency (nbSeq==127)
The nbSeq "short" format (1-byte)
is compatible with any value < 128.

However, the code would cautiously only accept values < 127.
This is not an error, because the general 2-bytes format
is compatible with small values < 128.
Hence the inefficiency never triggered any warning.

Spotted by Intel's Smita Kumar.
2019-08-15 16:41:34 +02:00
Conrad Meyer ff6c81d90c Fix the build on GCC 4.x after 812e8f2a1
The ancient GCC 4.x doesn't understand the "optimize" attribute until 4.4.
Fix the build on platforms with GCC 4.x < 4.4 by limiting the DONT_VECTORIZE
definition to GCC 5 and greater.

Noticed and patch proposed by Warner Losh <imp@FreeBSD.org>.
2019-08-08 17:25:49 -07:00
Felix HandteandGitHub 87e31223e8 Merge pull request #1711 from felixhandte/changelog-v1.4.3
Update Changelog for v1.4.3
2019-08-06 17:02:37 -04:00
W. Felix Handte 6b68980173 Update Changelog for v1.4.3 2019-08-06 17:01:46 -04:00
Yann Collet 01b2331ad1 bumped version number
to v1.4.3
2019-08-05 17:17:16 +02:00
Yann ColletandGitHub 61936ba42a Merge pull request #1705 from josepho0918/dev
Add support for IAR C/C++ Compiler for Arm
2019-08-05 15:57:28 +02:00
Yann ColletandGitHub 26351071bc Merge pull request #1706 from LeeYoung624/dev
add NULL pointer check in util.c
2019-08-05 15:56:50 +02:00
Yann ColletandGitHub b2e71faaa8 Merge pull request #1709 from facebook/fix1624
Fix compression ratio inefficiency
2019-08-05 15:54:59 +02:00
Yann Collet facbe8b2c2 factored the logic selecting lowest match index
as suggested by @terrelln
2019-08-05 15:18:43 +02:00
Yann Collet 0b0b83e8f3 fix test 122
it's an unsupported scenario.
2019-08-03 16:51:26 +02:00
Yann Collet efe8496755 minor test refactoring
just for clarity, for the currently failing unit test
2019-08-02 19:31:19 +02:00
Yann Collet 387e20d4f0 fixed minor conversion warning in datagen 2019-08-02 18:02:54 +02:00
Yann Collet 37f47e51a8 fixed datagen
to produce same content on both 32 and 64-bit platforms
by removing floating from literal table determination.

also : added checksum trace in compression control test,
so that it's easier to determine if test fails
as a consequence of compressing a different sample.
2019-08-02 17:34:53 +02:00
Yann Collet d1927f0b39 regenerate sample to compress
to reduce chances of differences between 32 and 64-bit fuzzer tests
2019-08-02 15:31:00 +02:00
Yann Collet 98e7c344cd fixed strategies btopt+ 2019-08-02 14:42:53 +02:00