Commit Graph

7331 Commits (f25a6e9f8f36375bce85bfefdf388c770057c27c)

Author SHA1 Message Date
Yann Collet 1d6070463f
Merge pull request #1853 from facebook/ahmed_file
--filelist=FILE feature
2019-11-26 20:57:25 -08:00
Peter Lesslie 8eb499d354 Check for fread failure
On failure fread may return either a short read or 0. Need to use
ferror to detect error versus eof.
2019-11-26 20:47:58 -06:00
Yann Collet d5b4a7ea58 removed scanbuild workaround 2019-11-26 17:46:57 -08:00
Yann Collet ecaf3ce103 reverted ppc qemu and scanbuild on trusty
ppc cross-compilation seems broken outside of trusty
scan-build version changes with distrib version, resulting in a different list of false positives
2019-11-26 16:44:56 -08:00
Yann Collet 96ee20758c assembleFNT() can no longer fail 2019-11-26 15:44:33 -08:00
Yann Collet aaab618ae9 pushed aside stdio.h too
since only UTIL_DISPLAY() depended on it.
2019-11-26 15:25:32 -08:00
Yann Collet 7543cd055c moved UTIL_DISPLAY() inside util.c 2019-11-26 15:21:58 -08:00
Yann Collet a684b82774 util: isolated some dependencies
from *.h to *.c
so that they don't get transitively included
into users of util.h.
2019-11-26 15:16:53 -08:00
Yann Collet f57be339ab travisCI : removed `trusty` generic statement
trusty is out of long term support.
let's run (most) tests on "current" platform.
2019-11-26 15:01:16 -08:00
Yann Collet 2d9fad4f52 fixed minor VS warning, on parameter difference
complaining about a `const` property on one side but not the other.
2019-11-26 14:53:37 -08:00
Yann Collet f622c0adf3 switched UTIL_refFilename() to an assert() 2019-11-26 14:48:23 -08:00
Yann Collet 46bdbb9c06 Merge branch 'dev' into ahmed_file 2019-11-26 14:33:04 -08:00
Yann Collet 49cacd858b fixed fifo test 2019-11-26 14:18:09 -08:00
Bimba Shrestha a3a3c62b81 [fuzz] Only set HUF_repeat_valid if loaded table has all non-zero weights (#1898)
Fixes a fuzz issue where dictionary_round_trip failed because the compressor was generating corrupt files thanks to zero weights in the table.

* Only setting loaded dict huf table to valid on non-zero

* Adding hasNoZeroWeights test to fse tables

* Forbiding nbBits != 0 when weight == 0

* Reverting the last commit

* Setting table log to 0 when weight == 0

* Small (invalid) zero weight dict test

* Small (valid) zero weight dict test

* Initializing repeatMode vars to check before zero check

* Removing FSE changes to seperate pr

* Reverting accidentally changed file

* Negating bool, using unsigned, optimization nit
2019-11-26 12:24:19 -08:00
Bimba Shrestha d4e17d0776 Negating bool, updating bool on inner branches 2019-11-26 12:17:43 -08:00
Yann Collet c71bd45a3b Merge branch 'dev' into ahmed_file 2019-11-26 11:20:26 -08:00
Yann Collet 87ae7b940b travisCI: moved compatibility tests to `dev`
they are fast enough, and we want to catch such incompatibility early
2019-11-26 10:30:43 -08:00
Yann Collet 1d7adee68e moved meson and versions compatibility tests to master/cron
also : joined c99 compatibility tests with gnu90 and c++ ones
2019-11-26 10:28:21 -08:00
Yann Collet 228a6d28cd travis : added test durations
as a guide when doing test selection
2019-11-26 10:24:09 -08:00
Yann Collet d6e0a44576
Merge pull request #1905 from facebook/devnull
fix #1904
2019-11-25 18:48:12 -08:00
Nick Terrell 718f00ff6f
Optimize decompression speed for gcc and clang (#1892)
* Optimize `ZSTD_decodeSequence()`
* Optimize Huffman decoding
* Optimize `ZSTD_decompressSequences()`
* Delete `ZSTD_decodeSequenceLong()`
2019-11-25 18:26:19 -08:00
Yann Collet 5e657aca90 silence scan-build false positive
blind attempt
2019-11-25 15:50:58 -08:00
Yann Collet 9a3de0a535 changed name from createX to assembleX
shows that the resulting object just takes ownership of provided buffer.
2019-11-25 15:34:55 -08:00
Yann Collet b1de3ecdd5 fix mode_t on Windows 2019-11-25 13:59:35 -08:00
Yann Collet 9a22140ef4 created UTIL_chmod()
protecting "/dev/null" from having its permissions changed.

also : minor : improved consistency of util.h API
2019-11-25 13:45:22 -08:00
Yann Collet 60db21a677 added decompression into /dev/null tests 2019-11-25 10:53:03 -08:00
Yann Collet 7aaac3f69c fix #1904
/dev/null permissions were modified when using sudo rights.
This fixes this bug during decompression.

More importantly, this patch  adds a test, triggered in TravisCI,
ensuring unaltered /dev/null permissions.
2019-11-25 10:35:36 -08:00
Yann Collet 762a0dfc45 minor update to travis script
many tests used to be run on Trusty platform,
they are now run on _current_ platform,
and now many test titles are incorrect.
Fixed.
2019-11-22 17:32:07 -08:00
Bimba Shrestha 826b555463
Merge branch 'dev' into oss 2019-11-22 17:29:33 -08:00
Yann Collet d4ce04c3e7
Merge pull request #1897 from sergey-dryabzhinsky/patch-1
WIP: Fix typo in util.c
2019-11-22 17:25:55 -08:00
Bimba Shrestha 707a12c419 Test enough room for checksum in superblock 2019-11-22 17:25:36 -08:00
Nick Terrell 385a447e52
Merge pull request #1903 from terrelln/null
Fix null pointer addition
2019-11-21 17:35:06 -08:00
Yann Collet b8c9e6e36d
Merge pull request #1902 from terrelln/ignore
[cmake][tests] Add zstreamtest executable
2019-11-21 15:49:06 -08:00
Bimba Shrestha 10bce1919e Mixed declration fix 2019-11-21 13:08:27 -08:00
Bimba Shrestha 0451accab1 Checking noCompressBlock explicitly for rep code confirmation 2019-11-21 13:06:26 -08:00
Nick Terrell 659e9f05cf Fix null pointer addition 2019-11-20 18:36:04 -08:00
Nick Terrell ac992b35a2 [cmake][tests] Add zstreamtest executable 2019-11-20 17:26:06 -08:00
Nick Terrell 0bea5d6589
Merge pull request #1901 from terrelln/ignore
Update .gitignore
2019-11-20 17:24:19 -08:00
Nick Terrell e68db76b4b Update .gitignore 2019-11-20 16:36:40 -08:00
Yann Collet 2d4dcce55f
Merge pull request #1894 from felixhandte/doc-clarify-dctx-reset
Easy: Update Comment on `ZSTD_initDStream()`
2019-11-19 16:18:56 -08:00
Yann Collet c8fd2cf4c9
Merge pull request #1887 from bimbashrestha/doc-fix
Fixing hashLog error 2^26=64Mib
2019-11-19 16:14:20 -08:00
Nick Terrell 9cf8e67aaf
Merge pull request #1896 from terrelln/test-fixes
Fix Appveyor failure
2019-11-19 12:52:51 -08:00
Sergey Dryabzhinsky 612a06eb3e
Update util.c 2019-11-19 23:24:00 +03:00
Sergey Dryabzhinsky f62cf1fff5
Fix typo in util.c
There must be mtim*e*
2019-11-19 23:15:28 +03:00
Nick Terrell e0d6daabac Fix Appveyor failure 2019-11-19 11:12:26 -08:00
Bimba Shrestha 8f0c2d04c8 Going back to original flow but removing else return 2019-11-19 10:03:07 -08:00
Bimba Shrestha b032a6e1d9 Updated some more outdated bounds 2019-11-19 09:55:13 -08:00
W. Felix Handte 722149cf2b Easy: Update Comment on `ZSTD_initDStream()` 2019-11-19 01:57:15 -05:00
W. Felix Handte b5fb2e7c12 Add Tool to Diagnose Whether Corrupt Blobs are Plausibly Bit-Flips
I spend an increasing amount of my time looking at "Corrupted block detected"
failures in decompression. Not infrequently, I suspect that it is the result
of hardware failure, and that the blob has become bit-flipped or otherwise
corrupted somewhere along the line.

For that reason I was motivated to write a little tool to inspect blobs that
fail to decompress, to try modifying them, and then check whether they
decompress successfully. This seems like potentially a generally useful tool,
so I figured it might be worth putting in `contrib/`.
2019-11-19 01:53:36 -05:00
Nick Terrell 6a7f65117e
Merge pull request #1866 from legrosbuffle/dev
Optimized loop bounds to allow the compiler to unroll the loop.
2019-11-18 16:16:30 -08:00