mirror of
https://github.com/facebook/zstd.git
synced 2025-01-11 04:20:25 +08:00
[largeNbDicts] Fix decompression segfault in createCompressInstructions
Benchmarking decompression results in a segfault in `createCompressInstructions` because `cctxParams` is NULL. Skip running that function if we are not benching compression.
This commit is contained in:
parent
43f21a600e
commit
d0c88afe6d
@ -670,7 +670,9 @@ static int benchMem(slice_collection_t dstBlocks,
|
||||
BMK_createTimedFnState(total_time_ms, ms_per_round);
|
||||
|
||||
decompressInstructions di = createDecompressInstructions(ddictionaries);
|
||||
compressInstructions ci = createCompressInstructions(cdictionaries, cctxParams);
|
||||
compressInstructions ci;
|
||||
if (benchCompression)
|
||||
ci = createCompressInstructions(cdictionaries, cctxParams);
|
||||
void* payload = benchCompression ? (void*)&ci : (void*)&di;
|
||||
BMK_benchParams_t const bp = {
|
||||
.benchFn = benchCompression ? compress : decompress,
|
||||
|
Loading…
Reference in New Issue
Block a user