| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| | | |
| | | | |
lib: allow to disable shared libraries
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Just like BUILD_STATIC=no disables static libraries, BUILD_SHARED=no
disabled shared libraries. This is useful to support toolchains that do
not support shared libraries.
|
|\ \ \ \
| |_|/ /
|/| | | |
fixed lz4_fast clang performance
|
| | | | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The simple change from
`matchIndex+MAX_DISTANCE < current`
towards
`current - matchIndex > MAX_DISTANCE`
is enough to generate a 10% performance drop under clang.
Quite massive.
(I missed as my eyes were concentrated on gcc performance at that time).
The second version is more robust, because it also survives a situation where
`matchIndex > current`
due to overflows.
The first version requires matchIndex to not overflow.
Hence were added `assert()` conditions.
The only case where this can happen is with dictCtx compression,
in the case where the dictionary context is not initialized before loading the dictionary.
So it's enough to always initialize the context while loading the dictionary.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The bug is a read up to 2 bytes past the end of the buffer.
There are three cases for this bug, one for each test case added.
* An empty input causes `token = *ip++` to read one byte too far.
* A one byte input with `(token >> ML_BITS) == RUN_MASK` causes
one extra byte to be read without validation. This could be
combined with the first bug to cause 2 extra bytes to be read.
* The case pointed out in issue #508, where `ip == iend` at the
beginning of the loop after taking the shortcut.
Benchmarks show no regressions on clang or gcc-7 on both my mac
and devserver.
Fixes #508.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The notes about "security guarantee" and "malicious inputs" seemed
a bit non-technical to me, so I took the liberty to tone them down
and instead describe the actual risks in technical terms. Namely,
the function never writes past the end of the output buffer, so
a direct hostile takeover (resulting in arbitrary code execution
soon after the return from the function) is not possible. However,
the application can crash because of reads from unmapped pages.
I also took the liberty to describe what I believe is the only sensible
usage scenario for the function: "This function is only usable if the
originalSize of uncompressed data is known in advance," etc.
|
|\ \
| | |
| | | |
minor length reduction of several large lines
|
| | | |
|
| |/ |
|
|\ \
| |/
|/| |
Wrap likely/unlikely macroses with #ifndef
|
| |
| |
| |
| |
| | |
It prevent redefine error when project using lz4 has its own likely/unlikely
macroses.
|
| | |
|
| |
| |
| |
| | |
wrong test
|
| |
| |
| |
| | |
can happen with dictCtx
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
This actually ensures the guarantee referred to in the comment in
LZ4_compress_fast_continue().
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Also removed pointer comparison, which should solve #485
|
| |
| |
| |
| |
| |
| |
| | |
Someone found it would be a great idea to define there a global variable under the very generic name "index".
Cause problem with shadow warnings, so no variable can be named "index" now ...
Also : automatically update API manual
|
| | |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
ptr diff -> U32
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| | |
Or: `goto` Considered Harmful
Or: https://xkcd.com/292/
|
| |
| |
| |
| | |
./fuzzer -vv -s4217 -t7518
|
| |
| |
| |
| |
| |
| | |
switch to byU32 when src address is < 64K
note : byPtr is still useful in 32-bits, as it's about ~10% faster
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
to use indexes (U32) instead of Ptr.
byPtr is still present.
|
| |
| |
| |
| | |
when using byU32 and byU16 modes
|
|\ \
| |/ |
|
| |\
| | |
| | | |
Better Describe Functionality of Obsolete Streaming Functions
|
| | | |
|