Commit Graph

359 Commits

Author SHA1 Message Date
Yann Collet
e2009622dd
Merge pull request #1022 from lz4/uname
make UNAME externally definable
2021-09-20 16:04:07 -07:00
a1346054
3e99d07bc0 trim excess whitespace 2021-08-21 22:24:52 +00:00
a1346054
6a8e21d802 fix warnings reported by shellcheck in shell scripts 2021-08-21 20:46:23 +00:00
a1346054
d68bfbde54 use the same style of hashbang for all files 2021-08-21 20:45:30 +00:00
a1346054
8df946943d fix broken hashbangs 2021-08-21 20:38:29 +00:00
Yann Collet
596c747211 make UNAME externally definable
on top of providing a central definition place, which eases maintenance,
it might also help for #1021.

Also : updated doc
2021-08-16 16:43:17 -07:00
Yann Collet
57ed27f46e minor documentation for unicode_lint 2021-08-09 05:33:20 -07:00
Nate
424e1d9622
tests(tests/unicode_lint.sh): expand unicode lint to the ./tests/ directory 2021-08-08 15:10:58 -04:00
Nate
7b4692596e
nit(tests/unicode_lint.sh): standardize failure format message 2021-08-08 00:36:06 -04:00
Nate
594ec829e3
tests(unicode_lint.sh): create: lint source files in ./lib/ and ./programs/ for Unicode 2021-08-08 00:34:07 -04:00
Yann Collet
d1d3266bc5 fixed minor type, reported by @mwgamera 2021-08-06 14:45:42 -07:00
Takayuki Matsuoka
3c3624c3a6 Fix g++-4.4 warning
g++-4.4 creates the following warning for this line.

```
g++-4.4 -Wno-deprecated -O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -I../lib -I../programs -DXXH_NAMESPACE=LZ4_  lz4frame.o lz4.o lz4hc.o xxhash.o checkFrame.c -o checkFrame
checkFrame.c: In function ‘int frameCheck(cRess_t, FILE*, unsigned int, size_t)’:
checkFrame.c:156: error: comparison between signed and unsigned integer expressions
```
2021-05-30 16:53:16 +09:00
Yann Collet
59273b7127 fix UB lz4:988 and lz4:1178
ensure `dictBase` is only used
when there is an actual dictionary content.
2021-05-28 00:56:26 -07:00
Yann Collet
4b7a327068 fix strange printf formatting warning
so now, `%p` _requires_ a `void*` pointer ?
2020-12-01 08:05:19 -08:00
Yann Collet
19564bce78 fix CFLAGS unexport issue 2020-11-30 17:42:36 -08:00
Yann Collet
87a80acbe7 updated license & header dates 2020-11-25 14:45:14 -08:00
Yann Collet
99ba44a596 fixed minor Visual warning
doesn't happen on my environment, though it's a different version of Visual Studio
2020-11-14 17:25:31 -08:00
Yann Collet
e0f85f2fc8 better visual conformance
only include <intrin.h> on vs2005+ (#947)
remove some useless #pragma
fix a few minor Visual warnings
2020-11-14 16:27:57 -08:00
Yann Collet
772a312b00 LZ4IO_createDict() doesn't need prefs 2020-11-13 22:16:39 -08:00
Yann Collet
2c4af01e19 proper fullbench's LZ4_calloc() 2020-11-09 10:58:31 -08:00
Yann Collet
a296839802 changed LZ4_calloc() to a 2-arguments signature
to remain similar to stdlib's calloc().

Updated test to use c++ compiler for stricter signature check.
2020-11-09 08:44:26 -08:00
Yann Collet
adc46ea4c1 fix fullbench's LZ4_free() 2020-11-09 00:29:52 -08:00
Yann Collet
44b13db532 Merge branch 'dev' into customMem 2020-11-08 23:26:19 -08:00
Yann Collet
52646e8d75 first proposal for LZ4_USER_MEMORY_FUNCTIONS
makes it possible to replace at link time
malloc, calloc and free
by user-provided functions
which must be named LZ4_malloc(), LZ4_calloc() and LZ4_free().

answer #937
2020-11-08 21:17:32 -08:00
Yann Collet
ba021f3fa2
Merge pull request #943 from lz4/fullbench_dec
Added decompression tests in fullbench
2020-11-08 20:47:55 -08:00
Yann Collet
c76564b944 attempt at silencing cppcheck 2020-11-08 19:48:47 -08:00
Yann Collet
38b77ece91 fullbench: added LZ4F_decompress_noHint() 2020-11-08 13:13:30 -08:00
Yann Collet
af58d2369c added test for LZ4_decompress_safe_withPrefix64k() 2020-11-08 13:12:27 -08:00
Yann Collet
b16b9fcdbc added similar tests for LZ4_saveDict()
fast (non-HC) variant
2020-11-07 18:24:02 -08:00
Yann Collet
a2222a879f fix #926
fix incorrect behavior of LZ4_saveDictHC()
when invoked right after initialization.
2020-11-07 18:12:26 -08:00
Yann Collet
e968a24129 unified alignment test
across lz4.c and lz4hc.c
2020-11-06 14:46:48 -08:00
Yann Collet
ad552101dd fix minor explicit cast 2020-10-31 01:55:04 -07:00
Yann Collet
4b97866333 reduce new test stack usage
use heap instead
2020-10-02 18:03:12 -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
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
392809d66e fix minor static analyzer warnings
detected by scan-build and cppcheck
fix #786
2020-09-29 17:09:58 -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
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
Yann Collet
ee4f37d284 fix compressing into NULL
fails properly
bug discovered by oss-fuzz
2020-09-26 11:31:57 -07:00
Yann Collet
4f57219a22 fixed ubsan tests with dynamic library 2020-09-17 16:49:21 -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
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
Yann Collet
da1272979f fix #847
support NULL input
without triggering undefined sanitizer
2020-09-15 14:54:53 -07:00