[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);
|
BMK_createTimedFnState(total_time_ms, ms_per_round);
|
||||||
|
|
||||||
decompressInstructions di = createDecompressInstructions(ddictionaries);
|
decompressInstructions di = createDecompressInstructions(ddictionaries);
|
||||||
compressInstructions ci = createCompressInstructions(cdictionaries, cctxParams);
|
compressInstructions ci;
|
||||||
|
if (benchCompression)
|
||||||
|
ci = createCompressInstructions(cdictionaries, cctxParams);
|
||||||
void* payload = benchCompression ? (void*)&ci : (void*)&di;
|
void* payload = benchCompression ? (void*)&ci : (void*)&di;
|
||||||
BMK_benchParams_t const bp = {
|
BMK_benchParams_t const bp = {
|
||||||
.benchFn = benchCompression ? compress : decompress,
|
.benchFn = benchCompression ? compress : decompress,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user