Age | Commit message (Collapse) | Author | Files | Lines |
|
only include <intrin.h> on vs2005+ (#947)
remove some useless #pragma
fix a few minor Visual warnings
|
|
suggested by @aqrit in #947
|
|
to remain similar to stdlib's calloc().
Updated test to use c++ compiler for stricter signature check.
|
|
|
|
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
|
|
fix #874
|
|
|
|
coverity reported a warning regarding a memcpy() overwrite.
This is a false positive (the memory area is large enough),
but it's true that it's not trivial to determine (encompassing struct),
and it's proper anyway to only memcpy() just the right amount of data.
|
|
- check alignment before casting a pointer
- saveDict : don't memmove() on NULL dst
|
|
Revert "Replace "static" to "LZ4_FORCE_INLINE" for small functions"
|
|
This reverts commit 0e3933edd435c54cc2e21e38f5d4ba7bf644a24e.
|
|
minor: identical declaration and prototypes of `LZ4HC_compress_optimal()`
also :
very minor optimization of `LZ4_memcpy_using_offset()`
|
|
More alignment tests
|
|
|
|
across lz4.c and lz4hc.c
|
|
The "static" specifier does not guarantee that the function will be inlined.
|
|
There is no reason to separate these two definitions!
|
|
This problem was reproduced on MSVC 2015 (32-bit). Both functions were called using the operator "call".
|
|
|
|
detected by scan-build, cppcheck and advanved compilation flags
fix #786
|
|
fix efficiency of LZ4_compress_HC_destSize()
|
|
applying new more accurate formula from LZ4_compress_HC_destSize()
also : fix some minor display issue in tests/frametest
|
|
must respect MFLIMIT distance from oend
|
|
fix compressing into NULL
|
|
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.
|
|
|
|
fails properly
bug discovered by oss-fuzz
|
|
properly track history
|
|
|
|
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.
|
|
|
|
Also : added memory-frugal software byte count for big endian 64-bit cpus.
Disabled by default.
|
|
rejigger bit counting intrinsics
|
|
which serves no more purpose.
The comment implies that the simple presence of this unused function was affecting performance,
and that's the reason why it was not removed earlier.
This is likely another side effect of instruction alignment.
It's obviously unreliable to rely on it in this way,
meaning that the impact will be different, positive of negative,
with any minor code change, and any minor compiler version change, even parameter change.
|
|
MSVC debug mode complains
|
|
* fix issue #783
|
|
Fix lz4/lz4#867
Optimize software fallback routines.
Delete some faulty (and dead?) MSVC big endian code.
|
|
Fix #876
|
|
by introducing a max limit acceleration value
|
|
Fixes `-Wsign-compare` issues.
|
|
|
|
Nothing internally sets dirty anymore. The only way to get that is if you use
an uninitialized context, in which case your warranty is void anyways.
|
|
`LZ4_memcpy()` uses `__builtin_memcpy()` to ensure that clang/gcc
can inline the `memcpy()` calls in freestanding mode.
This is necessary for decompressing the Linux Kernel with LZ4.
Without an analogous patch decompression ran at 77 MB/s, and with
the patch it ran at 884 MB/s.
|
|
Avoid old-style function definitions
|
|
Reducing stack usage in _t_alignment checks
|
|
Similar work in the kernel:
https://patchwork.kernel.org/patch/11351499/
UBsan (+clang-10) complains about doing pointer arithmetic (adding 0)
to a nullpointer.
This patch is tested with clang-10+ubsan
|
|
|
|
Define 0-argument functions like foo(void) instead of foo(), in order
to avoid a warning with -Wold-style-definition. This makes it easier
to embed lz4.c in projects that compile with -Werror
-Wold-style-definition.
|
|
|
|
when src ptr is in very low memory area (< 64K),
the virtual reference to data in dictionary
might end up in a very high memory address.
Since it's not a "real" memory address,
just a virtual one, to calculate distance,
it doesn't matter : only distance matters.
The assert was to restrictive.
Fixed.
|