Commit Graph

1941 Commits

Author SHA1 Message Date
W. Felix Handte
535636ff5c Don't Attach Very Small Dictionaries
Fixes a mismatch in behavior between loading into the context (via
`LZ4_loadDict()`) a very small (<= 4 bytes) non-contiguous dictionary, versus
attaching it with `LZ4_attach_dictionary()`.

Before this patch, this divergence could be reproduced by running

```
make -C tests fuzzer MOREFLAGS="-m32"
tests/fuzzer -v -s1239 -t3146
```

Making sure these two paths behave exactly identically is an easy way to test
the correctness of the attach path, so it's desirable that this remain an
unpolluted, high signal test.
2018-12-04 14:05:11 -08:00
Yann Collet
3a510831c3
Merge pull request #615 from vtorri/dev
Windows: create import library with gcc directly, remove now useless def file
2018-12-02 12:30:25 -08:00
Vincent Torri
9021648ba7 Merge remote-tracking branch 'upstream/dev' into dev 2018-12-02 19:42:38 +01:00
Vincent Torri
b03714dc80 Windows: create import library with gcc directly, remove now useless def file 2018-12-02 18:50:18 +01:00
Vincent Torri
65ff6f8073 Merge remote-tracking branch 'upstream/master' into dev 2018-12-02 18:46:14 +01:00
Yann Collet
4d60ecc9c7
Merge pull request #612 from lzutao/fix_clang_fuzzer
Fix clang warning
2018-12-02 08:50:08 -08:00
Lzu Tao
49073aca86 clang: Fix -Wcomma 2018-12-02 20:39:47 +07:00
Lzu Tao
b9d3080d75 clang: Fix -Wcast-qual 2018-12-02 20:30:25 +07:00
Lzu Tao
0241755dbf Fix clang warnings: -Wformat-pedantic and -Werror=overflow 2018-12-02 20:12:24 +07:00
Yann Collet
3b8253a4bc
Merge pull request #611 from lzutao/mesonbuild
Support for Meson build and its CI tests
2018-12-01 19:35:47 -08:00
Lzu Tao
9f87365de5 Add Travis meson build 2018-12-02 10:00:27 +07:00
Lzu Tao
5bc119455f Add meson build system 2018-12-02 10:00:27 +07:00
Yann Collet
6689dae33b
Merge pull request #610 from antinucleon/bootcamp
[amalgamation] lz4frame.c
2018-11-26 12:14:27 -08:00
Bing Xu
b192c86ba4 [amalgamation] lz4frame.c 2018-11-26 11:30:15 -08:00
Bing Xu
b4efd20ac8 Merge remote-tracking branch 'upstream/master' into bootcamp 2018-11-26 11:12:49 -08:00
Yann Collet
01d2a721d3
Merge pull request #606 from nh2/patch-1
lz4_Frame_format.md: Fix typo HexaBytes -> Exabytes
2018-11-25 13:38:37 -08:00
Niklas Hambüchen
ca45db8d4f
lz4_Frame_format.md: Fix typo HexaBytes -> Exabytes 2018-11-24 22:13:10 +01:00
Yann Collet
0983fd61ee
Merge pull request #605 from vtorri/dev
Allow installation of lz4 for Windows (MSYS2 or when cross-compiling)
2018-11-21 10:04:37 -08:00
Vincent Torri
bd2b259760 Uninstall DLL and import lib 2018-11-21 09:07:26 +01:00
Vincent Torri
8e8b658bde Add explanation for the installation of the DLL in the bin directory 2018-11-21 08:40:51 +01:00
Vincent Torri
0314027051 Allow installation of lz4 for Windows (MSYS2 or when cross-compiling) 2018-11-20 21:08:23 +01:00
Vincent Torri
4602f141fa Merge remote-tracking branch 'upstream/master' into dev 2018-11-20 20:41:56 +01:00
Yann Collet
1e72459f76
Merge pull request #604 from vtorri/dev
Add DLLTOOL variable so that one can override dlltool binary
2018-11-19 14:31:37 -08:00
Vincent Torri
e057e94215 update lib/README.md 2018-11-18 21:03:27 +01:00
Vincent Torri
d966844a95 Add documentation about DLLTOOL variable 2018-11-18 13:22:10 +01:00
Vincent Torri
b5e106220b Add DLLTOOL variable so that one can override dlltool binary
This fix cross compilation on linux for Windows
2018-11-17 14:17:15 +01:00
Yann Collet
c910db3a41
Merge pull request #603 from vtorri/dev
Use / instead of \ when accessing files in the dll subdirectory.
2018-11-17 00:52:56 -08:00
Vincent Torri
31ce8b56e5 Use / instead of \ when accessing files in the dll subdirectory.
This allow cross-compilation for Windows on Linux
2018-11-17 07:44:23 +01:00
Yann Collet
6686e7597c
Merge pull request #600 from antinucleon/bootcamp
Enable amalgamation of lz4hc.c and lz4.c
2018-11-16 11:14:46 -08:00
Bing Xu
a7e8d394c0 [amalgamation] add test 2018-11-16 09:37:19 -08:00
Bing Xu
17f5071e72 Enable amalgamation of lz4hc.c and lz4.c 2018-11-15 22:24:25 -08:00
Yann Collet
1b819bfd63
Merge pull request #593 from felixhandte/lz4hc-publish-static
Extend Macro to Allow Publishing Experimental LZ4HC Functions in Dynamic Libraries
2018-10-16 15:33:58 -07:00
W. Felix Handte
6a2da13cb7 Make LZ4HC Experimental Functions Dynamically Publishable 2018-10-15 17:23:06 -07:00
W. Felix Handte
45dc195f84 Change Comment and Make LZ4LIB_STATIC_API Available to LZ4HC 2018-10-15 17:22:37 -07:00
Yann Collet
bf9bf80f8d updated code documentation
to clarify #589
2018-10-15 11:14:30 -07:00
Yann Collet
5bd197e838
Merge pull request #583 from khabinov/stream-dirty-context-hc
Adding information about dirty context for _HC_ family of functions
2018-10-11 10:33:54 -07:00
Oleg Khabinov
f27ea0774e Adding information about dirty context for _HC_ family of functions 2018-10-10 10:33:04 -07:00
Yann Collet
df6d00ede5
Merge pull request #592 from lz4/compressEnd
fix LZ4F_compressEnd()
2018-10-09 15:37:55 -07:00
Yann Collet
6902fa4892 fixed #589
following recommendations by @raggi.

The fix is slightly different, but achieves the same goal,
and is backed by a test tool which proves that it works
(generates the error before the patch, no longer after the patch).
2018-10-09 14:37:51 -07:00
Yann Collet
e07a37d712 added a test for LZ4F_compressEnd()
which actively tries to make it write out of bound.
For this scenario to be possible,
it's necessary to set dstCapacity < LZ4F_compressBound()

When a compression operation fails,
the CCtx context is left in an undefined state,
therefore compression cannot resume.
As a consequence :
- round trip tests must be aborted, since there is nothing valid to decompress
- most users avoid this situation, by ensuring that dstCapacity >= LZ4F_compressBound()

For these reasons, this use case was poorly tested up to now.
2018-10-09 14:25:18 -07:00
Yann Collet
637245958f
Merge pull request #588 from khabinov/stream-dirty-followups
Some followups and renamings
2018-10-09 13:14:00 -07:00
Yann Collet
a963621eb0
Merge pull request #586 from blezsan/custom_block_sizes
support custom block sizes
2018-10-02 10:37:20 -07:00
Blaise Sanouillet
294293d899 support custom block sizes: fix memory leak to make CI builds happy 2018-10-02 05:38:30 -07:00
Oleg Khabinov
28eb88d988 Some followups and renamings 2018-10-01 15:19:45 -07:00
Blaise Sanouillet
d4703852b1 support custom block sizes: remove unneeded fudging, fix leaked filehandles, other nits 2018-10-01 05:22:50 -07:00
Blaise Sanouillet
7f18842244 Merge branch 'dev' into custom_block_sizes 2018-10-01 05:09:19 -07:00
Yann Collet
b18b6e53e1
Merge pull request #587 from lz4/hintbug
fixed improper hint
2018-09-28 16:58:01 -07:00
Yann Collet
48cd25a4b3
Merge pull request #580 from khabinov/stream-error-flag-initCheck
Rename initCheck to dirtyContext and use it in LZ4_resetStream_fast()
2018-09-28 15:58:22 -07:00
Yann Collet
21120549a7 fixed improper hint
when LZ4F_decompress() decodes an uncompressed block,
it provides an incorrect hint for next block
when frame checksum is enabled and block checksum is not.

Impact is low : the hint is just an hint,
the decoder works whatever the amount of input provided.

But the assumption that each call to LZ4F_decompress()
would generate just one complete block if input size hint was respected
was broken by this error.
2018-09-28 14:57:50 -07:00
Oleg Khabinov
f2ae385c2f Rename initCheck to dirtyContext and use it in LZ4_resetStream_fast() to check if full reset is needed. 2018-09-28 14:55:05 -07:00