1
0
mirror of https://github.com/lz4/lz4.git synced 2026-10-24 01:48:57 +03:00

3 Commits

Author SHA1 Message Date
Yann Collet
7bf22d3373 tests: fix memory leak in decompress-partial-usingDict
main() allocated `buffer` and `dict` with malloc() and never freed them,
neither on success nor on any of the five error paths.
LeakSanitizer reports 133118 bytes leaked in 2 allocations.

Route all exits through a single `_end` label that frees both buffers.

Checked with gcc -fsanitize=address,undefined: no leak reported, on the
success path and on a forced error path.
2026-10-17 12:18:53 -07:00
Yann Collet
35d58a5ea7 fix decompress-partial-usingDict.c
The recently added test decompress-partial-usingDict
tends to fail for unknown reasons,
more frequently under the combination for clang-9 + `-mx32`.

There is a suspicion that the test is using too much stack.
Fixing that, + adding traces, to get more information if it fails again.
2022-07-15 13:05:43 +02:00
Qi Wang
ec75db2294 tests: add tests for LZ4_decompress_safe_partial_usingDict
Signed-off-by: Qi Wang <wangqi@linux.alibaba.com>
2022-06-07 17:12:51 +08:00