| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
because ubsan complains even about intermediate pointer arithmetic results
(in a simple linear formula with 3 factors for example).
use parenthesis to make sure calculations go directly from one valid memory address to another valid memory address value.
|
|
|
|
|
| |
this formalized better the coupling between match length and match offset
which were 2 separated variables before.
|
|
|
|
|
| |
replaced by direct offset value.
this virtual pointer was only used in rare _dstSize scenario.
|
|
|
|
| |
replaced by direct offset values.
|
|
|
|
| |
instead of a virtual pointer
|
|
|
|
| |
instead of a virtual past pointer.
|
|
|
|
| |
and also on decompress_continue variants.
|
|
|
|
| |
now, even intermediate ptr arithmetic results can be UB ??
|
|
|
|
|
|
|
| |
benchmark dictionary mode, implemented in #808, is incorrect.
It would desynchronize compression and decompression as soon as 2+ files are dictionary compressed.
Also : slightly improved traces system, to also include __LINE__ number
|
|
|
|
| |
mostly related to pointer arithmetic involving NULL ptr.
|
|
|
|
| |
LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION is enabled
|
|\
| |
| | |
Introduce LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset introduces new compile time switch macro LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
which removes the following functions when it's defined.
```
// lz4.c
LZ4_createStream
LZ4_freeStream
LZ4_createStreamDecode
LZ4_freeStreamDecode
LZ4_create // legacy
// lz4hc.c
LZ4_createStreamHC(void)
LZ4_freeStreamHC
LZ4_createHC // legacy
LZ4_freeHC // legacy
```
These functions uses dynamic memory allocation functions such as malloc() and free().
It'll be useful for freestanding environment which doesn't have these allocation functions.
Since this change breaks API, this macro is only valid with lz4 as a static linked object.
|
|/
|
|
|
|
|
|
| |
This changeset introduces the following external macros.
- Add new macro LZ4_memset() which enables to inject external function as memset().
- Similar macro LZ4_memmove() for memmove().
- In same manner, LZ4_memcpy() also can be overriden by external macro.
|
|
|
|
| |
replaced by ->dictStart
|
|
|
|
| |
replaced by ->prefixStart
|
| |
|
|
|
|
| |
and run it in GA CI
|
|
|
|
| |
discovered by @yoniko.
|
| |
|
| |
|
| |
|
|
|
|
| |
LZ4_streamHCPtr->internal_donotuse.end is NULL.
|
| |
|
| |
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
- check alignment before casting a pointer
- saveDict : don't memmove() on NULL dst
|
|
|
|
|
| |
fix incorrect behavior of LZ4_saveDictHC()
when invoked right after initialization.
|
|\
| |
| | |
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
|
| |
| |
| |
| |
| | |
this it works fine in this environment
(only x86 is suspicious)
|
|\ \
| | |
| | | |
Fix: The "inline" specifier do not use for LZ4_wildCopy8 and LZ4_wildCopy32
|
| |/
| |
| |
| | |
The "static" specifier does not guarantee that the function will be inlined.
|
|/ |
|
| |
|
|
|
|
|
| |
detected by scan-build, cppcheck and advanved compilation flags
fix #786
|
|
|
|
| |
must respect MFLIMIT distance from oend
|
|
|
|
| |
after truncation of last sequence
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
When the match is very long and found quickly, we can do
matchLength * nbCompares iterations through the chain
swapping, which can really slow down compression.
|