Commit Graph

2503 Commits

Author SHA1 Message Date
Yann Collet
78433070ab document LZ4_ALIGN_TEST 2020-11-06 14:48:43 -08:00
Yann Collet
e968a24129 unified alignment test
across lz4.c and lz4hc.c
2020-11-06 14:46:48 -08:00
Yann Collet
1008b8929e
Merge pull request #938 from terrelln/fuzzer-fix
[ossfuzz] Fix parallel builds
2020-11-06 10:34:05 -08:00
Nick Terrell
073fe18edf [ossfuzz] Fix parallel builds
With `make -j` multiple builds of `standaloneengine.o` happened in
parallel. Fix this by detecting `standaloneengine.o` and moving it to a
depedency.
2020-11-05 10:31:07 -08:00
Yann Collet
ad552101dd fix minor explicit cast 2020-10-31 01:55:04 -07:00
Yann Collet
664427aa8f
Merge pull request #930 from remittor-pr/fix_msvc
Fix: The "inline" specifier do not use for LZ4_wildCopy8 and LZ4_wildCopy32
2020-10-31 01:44:21 -07:00
remittor
0e3933edd4 Replace "static" to "LZ4_FORCE_INLINE" for small functions
The "static" specifier does not guarantee that the function will be inlined.
2020-10-07 09:52:40 +03:00
remittor
749bd91a06 Replace define LZ4_FORCE_O2_INLINE_GCC_PPC64LE to LZ4_FORCE_INLINE
There is no reason to separate these two definitions!
2020-10-07 09:51:08 +03:00
Yann Collet
644ab86b8c
Merge pull request #928 from remittor-pr/human_redable
Made function LZ4HC_encodeSequence a human readable
2020-10-06 10:49:42 -07:00
remittor
c4792cdfa9 Fix: The "inline" specifier do not use for LZ4_wildCopy8 and LZ4_wildCopy32
This problem was reproduced on MSVC 2015 (32-bit). Both functions were called using the operator "call".
2020-10-06 17:16:43 +03:00
remittor
c24e979063 [lz4hc] Made function LZ4HC_encodeSequence a human readable 2020-10-03 18:32:34 +03:00
Yann Collet
4b97866333 reduce new test stack usage
use heap instead
2020-10-02 18:03:12 -07:00
Yann Collet
389eacdfea Appveyor: added compilation and runtime fuzzer tests
to all Windows compiler targets
2020-10-02 17:41:19 -07:00
Yann Collet
2631002f74 preserver alignment test on Visual Studio x64
this it works fine in this environment
(only x86 is suspicious)
2020-10-02 15:51:14 -07:00
Yann Collet
c661adda10 fixed x32 test on Travis 2020-10-02 15:43:46 -07:00
Yann Collet
58c0a549ad fix cppcheck unused variable warning 2020-10-02 14:10:00 -07:00
Yann Collet
de52a52518 added LZ4_streamHC_t init test
which includes an alignment test
2020-10-02 13:23:11 -07:00
Yann Collet
d1414fd552
Merge pull request #925 from lz4/test_null
add LZ4F_decompress() tests with (NULL,0) input and output
2020-10-02 08:30:25 -07:00
Yann Collet
056cdd6cc6 define sentinelTest
to help scan-build detect the condition
2020-10-01 23:42:42 -07:00
Yann Collet
a88c8fb438 make it possible to select SCANBUILD binary on command line 2020-10-01 23:27:02 -07:00
Yann Collet
1e5ff76b36 add LZ4F_decompress() tests with (NULL,0) input and output
fix one (rare & complex) issue discovered by this test
2020-10-01 21:10:08 -07:00
Yann Collet
0aed7314de
Merge pull request #924 from lz4/safixes
fix minor static analyzer warnings
2020-10-01 12:53:27 -07:00
Yann Collet
03f006a7ea make scan-build accept assert() 2020-10-01 10:48:22 -07:00
Yann Collet
1e31f1d25c fix bad init scenario 2020-09-30 22:51:17 -07:00
Yann Collet
fe74eb2031 added memcpy() related SA warning fixes
memcpy() on NULL is UB, even if length is 0.
2020-09-30 21:20:07 -07:00
Yann Collet
d9619f55ef Merge branch 'safixes' of github.com:lz4/lz4 into safixes 2020-09-30 00:23:47 -07:00
Yann Collet
7d21f761c3 fix conversion warning 2020-09-29 21:53:42 -07:00
Yann Collet
40cc3aa9a2 Merge branch 'dev' into safixes 2020-09-29 17:21:59 -07:00
Yann Collet
ad2d2764c7 fix minor static analyzer warnings
detected by scan-build, cppcheck and advanved compilation flags
fix #786
2020-09-29 17:20:52 -07:00
Yann Collet
392809d66e fix minor static analyzer warnings
detected by scan-build and cppcheck
fix #786
2020-09-29 17:09:58 -07:00
Yann Collet
293713a4fa bump version number
to v1.9.3
2020-09-29 14:27:39 -07:00
Yann Collet
78f4fdbb89
Merge pull request #923 from lz4/fix784
fix efficiency of LZ4_compress_HC_destSize()
2020-09-28 14:04:56 -07:00
Yann Collet
ab89dda91d improved last literals run on LZ4_compress_destSize
applying new more accurate formula from LZ4_compress_HC_destSize()

also : fix some minor display issue in tests/frametest
2020-09-28 11:39:00 -07:00
Yann Collet
89736e4e27 ensure last match not too close to end
must respect MFLIMIT distance from oend
2020-09-27 23:59:56 -07:00
Yann Collet
a13c79d56d fix incorrect counting
after truncation of last sequence
2020-09-27 22:47:05 -07:00
Yann Collet
8a362a8ac8
Merge pull request #921 from lz4/doubleNull
fix compressing into NULL
2020-09-27 21:09:06 -07:00
Yann Collet
21062b063f
Merge pull request #922 from XVilka/tinycc-support
Fix compilation with TinyCC
2020-09-27 21:08:26 -07:00
Yann Collet
e7fe105ac6 fix efficiency of LZ4_compress_HC_destSize()
LZ4_compress_HC_destSize() had a tendency
to discard its last match when this match overflowed specified dstBuffer limit.
The impact is generally moderate,
but occasionally huge,
typically when this last match is very large
(such as compressing a bunch of zeroes).

Issue #784 fixed for both Chain and Opt implementations.

Added a unit test suggested by @remittor checking this topic.
2020-09-27 21:04:40 -07:00
Anton Kochkov
9730d91110 Fix compilation with TinyCC 2020-09-27 17:07:51 +08:00
Yann Collet
ee4f37d284 fix compressing into NULL
fails properly
bug discovered by oss-fuzz
2020-09-26 11:31:57 -07:00
Yann Collet
20856da7c5
Merge pull request #919 from attilaolah/cli
Add CMake option LZ4_BUILD_CLI
2020-09-23 08:23:59 -07:00
Attila Oláh
63942cdeba
Add CMake option LZ4_BUILD_CLI.
Defaults to ON so nothing changes, but it can be set to OFF so that the
CLI is not built at all, only the library.
2020-09-23 12:56:01 +00:00
Yann Collet
dc27b7ae41 comment bug on older versions of ZSTD_compress_destSize()
following investigation in #859
2020-09-17 20:59:01 -07:00
Yann Collet
d568a6d15c
Merge pull request #918 from lz4/usan_null
Properly fix #847
2020-09-17 20:23:06 -07:00
Yann Collet
4f57219a22 fixed ubsan tests with dynamic library 2020-09-17 16:49:21 -07:00
Yann Collet
b223f11b21 ubsan: make pointer overflow recoverable
the way `base` is used must allow 2-complement address overflow.
`base` is effectively a virtual pointer, never dereferenced directly.
What matters is `base + index`.
This is the address that will be dereference and must be valid (it is properly validated).
2020-09-17 15:34:03 -07:00
Yann Collet
10d2e1c694 fixed lz4frame with blocks of size 1
properly track history
2020-09-17 14:43:02 -07:00
Yann Collet
43bbb7decc Merge branch 'usan_null' of github.com:Cyan4973/lz4 into usan_null 2020-09-17 10:38:59 -07:00
Yann Collet
cfd1d8f9d0 Merge branch 'usan_null' of github.com:lz4/lz4 into usan_null 2020-09-17 10:32:05 -07:00
Yann Collet
b4a64e0eac fix ubsan test
which now fails with a clear error as intended
(not just print a status and move on).
should be reproduced on travisCI
2020-09-17 10:29:31 -07:00