summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-11-14fixed minor Visual warningYann Collet
doesn't happen on my environment, though it's a different version of Visual Studio
2020-11-14better visual conformanceYann Collet
only include <intrin.h> on vs2005+ (#947) remove some useless #pragma fix a few minor Visual warnings
2020-11-13LZ4IO_createDict() doesn't need prefsYann Collet
2020-11-09proper fullbench's LZ4_calloc()Yann Collet
2020-11-09changed LZ4_calloc() to a 2-arguments signatureYann Collet
to remain similar to stdlib's calloc(). Updated test to use c++ compiler for stricter signature check.
2020-11-09fix fullbench's LZ4_free()Yann Collet
2020-11-08Merge branch 'dev' into customMemYann Collet
2020-11-08first proposal for LZ4_USER_MEMORY_FUNCTIONSYann Collet
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-08Merge pull request #943 from lz4/fullbench_decYann Collet
Added decompression tests in fullbench
2020-11-08attempt at silencing cppcheckYann Collet
2020-11-08fullbench: added LZ4F_decompress_noHint()Yann Collet
2020-11-08added test for LZ4_decompress_safe_withPrefix64k()Yann Collet
2020-11-07added similar tests for LZ4_saveDict()Yann Collet
fast (non-HC) variant
2020-11-07fix #926Yann Collet
fix incorrect behavior of LZ4_saveDictHC() when invoked right after initialization.
2020-11-06unified alignment testYann Collet
across lz4.c and lz4hc.c
2020-10-31fix minor explicit castYann Collet
2020-10-02reduce new test stack usageYann Collet
use heap instead
2020-10-02fix cppcheck unused variable warningYann Collet
2020-10-02added LZ4_streamHC_t init testYann Collet
which includes an alignment test
2020-10-01define sentinelTestYann Collet
to help scan-build detect the condition
2020-10-01make it possible to select SCANBUILD binary on command lineYann Collet
2020-10-01add LZ4F_decompress() tests with (NULL,0) input and outputYann Collet
fix one (rare & complex) issue discovered by this test
2020-09-29fix minor static analyzer warningsYann Collet
detected by scan-build and cppcheck fix #786
2020-09-28Merge pull request #923 from lz4/fix784Yann Collet
fix efficiency of LZ4_compress_HC_destSize()
2020-09-28improved last literals run on LZ4_compress_destSizeYann Collet
applying new more accurate formula from LZ4_compress_HC_destSize() also : fix some minor display issue in tests/frametest
2020-09-27ensure last match not too close to endYann Collet
must respect MFLIMIT distance from oend
2020-09-27fix incorrect countingYann Collet
after truncation of last sequence
2020-09-27fix efficiency of LZ4_compress_HC_destSize()Yann Collet
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-26fix compressing into NULLYann Collet
fails properly bug discovered by oss-fuzz
2020-09-17fixed ubsan tests with dynamic libraryYann Collet
2020-09-17fixed lz4frame with blocks of size 1Yann Collet
properly track history
2020-09-17Merge branch 'usan_null' of github.com:lz4/lz4 into usan_nullYann Collet
2020-09-17fix ubsan testYann Collet
which now fails with a clear error as intended (not just print a status and move on). should be reproduced on travisCI
2020-09-15fix #847Yann Collet
support NULL input without triggering undefined sanitizer
2020-09-15added test triggering NULL arithmetic with usanYann Collet
described in #847
2020-08-27fixed minor pre-existing printf formattingYann Collet
different signedness
2020-08-27fixed strict c90 supportYann Collet
2020-08-27fix #783Yann Collet
LZ4_decompress_safe_partial() now also supports a scenario where nb_bytes_to_generate is <= block_decompressed_size And nb_bytes_to_read is >= block_compressed_size. Previously, the only supported scenario was nb_bytes_to_read == block_compress_size. Pay attention that, if nb_bytes_to_read is > block_compressed_size, then, necessarily, it requires that nb_bytes_to_generate is <= block_decompress_size. If both are larger, it will generate corrupted data.
2020-08-26Merge branch 'dev' into extraInputYann Collet
2020-08-25fix test under non-interactive environmentYann Collet
2020-08-25added more tests around --content-sizeYann Collet
notably in association with `stdin`
2020-08-25use variables for program invocationYann Collet
2020-08-18Merge branch 'dev' into extraInputYann Collet
2020-08-12Clarifies and fix EndMarkYann Collet
EndMark, the 4-bytes value indicating the end of frame, must be `0x00000000`. Previously, it was just mentioned as a `0-size` block. But such definition could encompass uncompressed blocks of size 0, with a header of value `0x80000000`. But the intention was to also support uncompressed empty blocks. They could be used as a keep-alive signal. Note that compressed empty blocks are already supported, it's just that they have a size 1 instead of 0 (for the `0` token). Unfortunately, the decoder implementation was also wrong, and would also interpret a `0x80000000` block header as an endMark. This issue evaded detection so far simply because this situation never happens, as LZ4Frame always issues a clean 0x00000000 value as a endMark. It also does not flush empty blocks. This is fixed in this PR. The decoder can now deal with empty uncompressed blocks, and do not confuse them with EndMark. The specification is also clarified. Finally, FrameTest is updated to randomly insert empty blocks during fuzzing.
2020-08-12fix issue #783 (#862)BellaXlp
* fix issue #783
2020-08-12added test decompress-partial with extraneous input bytesYann Collet
fails currently, for investigation of #783
2020-08-10Merge pull request #895 from lz4/hugefastYann Collet
Fix #876
2020-08-10add test that breaks --fastYann Collet
with huge values, as expected from #876 Also : added target `check`
2020-08-06Remove dirty Field From LZ4_stream_tW. Felix Handte
2020-07-13Merge pull request #866 from sandyharvie/devYann Collet
Fix issue #865