]> git.ipfire.org Git - thirdparty/zstd.git/commit
[largeNbDicts] Second try at fixing decompression segfault to always create compressI... 3209/head
authorHan Zhu <zhuhan7737@gmail.com>
Wed, 20 Jul 2022 23:01:32 +0000 (16:01 -0700)
committerHan Zhu <zhuhan7737@gmail.com>
Thu, 21 Jul 2022 18:55:01 +0000 (11:55 -0700)
commit6255f994d35219b60d3df21535c72675d5d6a98f
tree2249cce7318920be292e5cfda5384dd5aa71821b
parent466e13f7225387a4276738f421378396595a5d4a
[largeNbDicts] Second try at fixing decompression segfault to always create compressInstructions

Summary:
Freeing an uninitialized pointer is undefined behavior. This caused a segfault
when compiling the benchmark with Clang -O3 and benching decompression.

V2: always create compressInstructions but check if cctxParams is NULL before
setting CCtx params to avoid segfault.

Test Plan:
make and run
contrib/largeNbDicts/largeNbDicts.c