Task #78473 - zstd-1.5.7-3.fc44/scan-results.err
back to task #78473download
Error: COMPILER_WARNING (CWE-9001):
zstd-1.5.7/contrib/gen_html/gen_html.cpp:128:29: warning[-Wcomment]: ‘/*’ within comment
# 128 | /* comments of type /**< and /*!< are detected and only function declaration is highlighted (bold) */
# 126| }
# 127|
# 128|-> /* comments of type /**< and /*!< are detected and only function declaration is highlighted (bold) */
# 129| if ((line.find("/**<")!=string::npos || line.find("/*!<")!=string::npos) && line.find("*/")!=string::npos) {
# 130| sout << "<pre><b>";
Error: COMPILER_WARNING (CWE-9001):
zstd-1.5.7/contrib/gen_html/gen_html.cpp:128:38: warning[-Wcomment]: ‘/*’ within comment
# 126| }
# 127|
# 128|-> /* comments of type /**< and /*!< are detected and only function declaration is highlighted (bold) */
# 129| if ((line.find("/**<")!=string::npos || line.find("/*!<")!=string::npos) && line.find("*/")!=string::npos) {
# 130| sout << "<pre><b>";
Error: COMPILER_WARNING (CWE-9001):
zstd-1.5.7/contrib/gen_html/gen_html.cpp:162:29: warning[-Wcomment]: ‘/*’ within comment
# 162 | /* comments of type /*! mean: this is a function declaration; switch comments with declarations */
# 160| while (!comments.empty() && comments[0].empty()) comments.erase(comments.begin()); // remove empty line at the start
# 161|
# 162|-> /* comments of type /*! mean: this is a function declaration; switch comments with declarations */
# 163| if (exclam == '!') {
# 164| if (!comments.empty()) comments.erase(comments.begin()); /* remove first line like "ZSTD_XXX() :" */
Error: COMPILER_WARNING (CWE-9001):
zstd-1.5.7/contrib/gen_html/gen_html.cpp:182:57: warning[-Wcomment]: ‘/*’ within comment
# 182 | } else if (exclam == '=') { /* comments of type /*= and /**= mean: use a <H3> header and show also all functions until first empty line */
# 180| }
# 181| sout << "</p></pre><BR>" << endl << endl;
# 182|-> } else if (exclam == '=') { /* comments of type /*= and /**= mean: use a <H3> header and show also all functions until first empty line */
# 183| trim(comments[0], " ");
# 184| sout << "<h3>" << comments[0] << "</h3><pre>";
Error: COMPILER_WARNING (CWE-9001):
zstd-1.5.7/contrib/gen_html/gen_html.cpp:182:65: warning[-Wcomment]: ‘/*’ within comment
# 180| }
# 181| sout << "</p></pre><BR>" << endl << endl;
# 182|-> } else if (exclam == '=') { /* comments of type /*= and /**= mean: use a <H3> header and show also all functions until first empty line */
# 183| trim(comments[0], " ");
# 184| sout << "<h3>" << comments[0] << "</h3><pre>";
Error: COMPILER_WARNING (CWE-9001):
zstd-1.5.7/contrib/gen_html/gen_html.cpp:194:38: warning[-Wcomment]: ‘/*’ within comment
# 194 | } else { /* comments of type /** and /*- mean: this is a comment; use a <H2> header for the first line */
# 192| }
# 193| sout << "</pre></b><BR>" << endl;
# 194|-> } else { /* comments of type /** and /*- mean: this is a comment; use a <H2> header for the first line */
# 195| if (comments.empty()) continue;
# 196|
Error: COMPILER_WARNING (CWE-9001):
zstd-1.5.7/contrib/gen_html/gen_html.cpp:194:46: warning[-Wcomment]: ‘/*’ within comment
# 192| }
# 193| sout << "</pre></b><BR>" << endl;
# 194|-> } else { /* comments of type /** and /*- mean: this is a comment; use a <H2> header for the first line */
# 195| if (comments.empty()) continue;
# 196|
Error: CPPCHECK_WARNING (CWE-404):
zstd-1.5.7/contrib/pzstd/Pzstd.cpp:127: error[resourceLeak]: Resource leak: inputFd
# 125| auto inputFd = std::fopen(inputFile.c_str(), "rb");
# 126| if (!errorHolder.check(inputFd != nullptr, "Failed to open input file")) {
# 127|-> return nullptr;
# 128| }
# 129| return inputFd;
Error: CPPCHECK_WARNING (CWE-404):
zstd-1.5.7/contrib/pzstd/Pzstd.cpp:162: error[resourceLeak]: Resource leak: outputFd
# 160| if (!state.errorHolder.check(
# 161| outputFd != nullptr, "Failed to open output file")) {
# 162|-> return nullptr;
# 163| }
# 164| return outputFd;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/common/../common/allocations.h:49:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ZSTD_customCalloc(numThreads * 8, *ctx.customMem)’
zstd-1.5.7/lib/common/pool.c:215:12: enter_function: entry to ‘POOL_resize_internal’
zstd-1.5.7/lib/common/pool.c:217:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/common/pool.c:223:79: branch_false: ...to here
zstd-1.5.7/lib/common/pool.c:223:61: call_function: calling ‘ZSTD_customCalloc’ from ‘POOL_resize_internal’
zstd-1.5.7/lib/common/pool.c:223:61: return_function: returning to ‘POOL_resize_internal’ from ‘ZSTD_customCalloc’
zstd-1.5.7/lib/common/pool.c:224:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/common/pool.c:226:9: branch_false: ...to here
zstd-1.5.7/lib/common/pool.c:227:9: call_function: calling ‘ZSTD_customFree’ from ‘POOL_resize_internal’
# 47| if (ptr!=NULL) {
# 48| if (customMem.customFree)
# 49|-> customMem.customFree(customMem.opaque, ptr);
# 50| else
# 51| ZSTD_free(ptr);
Error: CPPCHECK_WARNING (CWE-457):
zstd-1.5.7/lib/compress/zstd_compress.c:2809: error[uninitvar]: Uninitialized variables: stats.Offtype, stats.MLtype
# 2807| DEBUGLOG(3, "ZSTD_buildCTable for LitLens failed");
# 2808| stats.size = countSize;
# 2809|-> return stats;
# 2810| }
# 2811| if (stats.LLtype == set_compressed)
Error: CPPCHECK_WARNING (CWE-457):
zstd-1.5.7/lib/compress/zstd_compress.c:7465: error[uninitvar]: Uninitialized variables: bs.blockSize, bs.litSize
# 7463| BlockSummary bs;
# 7464| bs.nbSequences = ERROR(externalSequences_invalid);
# 7465|-> return bs;
# 7466| }
# 7467| { BlockSummary bs;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/compress/zstdmt_compress.c:224:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
zstd-1.5.7/lib/compress/zstdmt_compress.c:1403:15: enter_function: entry to ‘ZSTDMT_createCompressionJob’
zstd-1.5.7/lib/compress/zstdmt_compress.c:1408:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/compress/zstdmt_compress.c:1414:10: branch_false: ...to here
zstd-1.5.7/lib/compress/zstdmt_compress.c:1414:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/compress/zstdmt_compress.c:1415:21: branch_true: ...to here
zstd-1.5.7/lib/compress/zstdmt_compress.c:1443:12: branch_true: following ‘true’ branch (when ‘endOp != 2’)...
zstd-1.5.7/lib/compress/zstdmt_compress.c:1444:42: branch_true: ...to here
zstd-1.5.7/lib/compress/zstdmt_compress.c:1455:12: branch_true: following ‘true’ branch (when ‘srcSize == 0’)...
zstd-1.5.7/lib/compress/zstdmt_compress.c:1456:15: branch_true: ...to here
zstd-1.5.7/lib/compress/zstdmt_compress.c:1455:14: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/compress/zstdmt_compress.c:1459:13: branch_true: ...to here
zstd-1.5.7/lib/compress/zstdmt_compress.c:1459:13: call_function: calling ‘ZSTDMT_writeLastEmptyBlock’ from ‘ZSTDMT_createCompressionJob’
# 222| DEBUGLOG(5, "ZSTDMT_getBuffer: created buffer of size %u", (U32)bSize);
# 223| }
# 224|-> return buffer;
# 225| }
# 226| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/decompress/../common/allocations.h:38:27: warning[-Wanalyzer-malloc-leak]: leak of ‘ZSTD_customMalloc(24, customMem)’
zstd-1.5.7/lib/decompress/zstd_decompress.c:1780:8: enter_function: entry to ‘ZSTD_DCtx_refDDict’
zstd-1.5.7/lib/decompress/zstd_decompress.c:1784:8: branch_true: following ‘true’ branch (when ‘ddict’ is non-NULL)...
zstd-1.5.7/lib/decompress/zstd_decompress.c:1785:9: branch_true: ...to here
zstd-1.5.7/lib/decompress/zstd_decompress.c:1787:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/decompress/zstd_decompress.c:1788:17: branch_true: ...to here
zstd-1.5.7/lib/decompress/zstd_decompress.c:1788:16: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/decompress/zstd_decompress.c:1789:34: branch_true: ...to here
zstd-1.5.7/lib/decompress/zstd_decompress.c:1789:34: call_function: calling ‘ZSTD_createDDictHashSet’ from ‘ZSTD_DCtx_refDDict’
# 36| /* calloc implemented as malloc+memset;
# 37| * not as efficient as calloc, but next best guess for custom malloc */
# 38|-> void* const ptr = customMem.customAlloc(customMem.opaque, size);
# 39| ZSTD_memset(ptr, 0, size);
# 40| return ptr;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/decompress/../common/allocations.h:49:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ZSTD_customMalloc(24, customMem)’
zstd-1.5.7/lib/decompress/zstd_decompress.c:1780:8: enter_function: entry to ‘ZSTD_DCtx_refDDict’
zstd-1.5.7/lib/decompress/zstd_decompress.c:1784:8: branch_true: following ‘true’ branch (when ‘ddict’ is non-NULL)...
zstd-1.5.7/lib/decompress/zstd_decompress.c:1785:9: branch_true: ...to here
zstd-1.5.7/lib/decompress/zstd_decompress.c:1787:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/decompress/zstd_decompress.c:1788:17: branch_true: ...to here
zstd-1.5.7/lib/decompress/zstd_decompress.c:1788:16: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/decompress/zstd_decompress.c:1789:34: branch_true: ...to here
zstd-1.5.7/lib/decompress/zstd_decompress.c:1789:34: call_function: calling ‘ZSTD_createDDictHashSet’ from ‘ZSTD_DCtx_refDDict’
# 47| if (ptr!=NULL) {
# 48| if (customMem.customFree)
# 49|-> customMem.customFree(customMem.opaque, ptr);
# 50| else
# 51| ZSTD_free(ptr);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/decompress/zstd_ddict.c:112:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
zstd-1.5.7/lib/decompress/zstd_ddict.c:170:13: enter_function: entry to ‘ZSTD_createDDict’
zstd-1.5.7/lib/decompress/zstd_ddict.c:173:12: call_function: calling ‘ZSTD_createDDict_advanced’ from ‘ZSTD_createDDict’
# 110|
# 111| /* load entropy tables */
# 112|-> RETURN_ERROR_IF(ZSTD_isError(ZSTD_loadDEntropy(
# 113| &ddict->entropy, ddict->dictContent, ddict->dictSize)),
# 114| dictionary_corrupted, "");
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/decompress/zstd_ddict.c:112:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ZSTD_customMalloc(27352, customMem)’
zstd-1.5.7/lib/decompress/zstd_ddict.c:180:13: enter_function: entry to ‘ZSTD_createDDict_byReference’
zstd-1.5.7/lib/decompress/zstd_ddict.c:183:12: call_function: calling ‘ZSTD_createDDict_advanced’ from ‘ZSTD_createDDict_byReference’
# 110|
# 111| /* load entropy tables */
# 112|-> RETURN_ERROR_IF(ZSTD_isError(ZSTD_loadDEntropy(
# 113| &ddict->entropy, ddict->dictContent, ddict->dictSize)),
# 114| dictionary_corrupted, "");
Error: CPPCHECK_WARNING (CWE-457):
zstd-1.5.7/lib/decompress/zstd_decompress.c:731: error[uninitvar]: Uninitialized variable: frameSizeInfo.nbBlocks
# 729| frameSizeInfo.compressedSize = ret;
# 730| frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR;
# 731|-> return frameSizeInfo;
# 732| }
# 733|
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1783:67: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘sequences[<unknown>].litLength’
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1975:1: enter_function: entry to ‘ZSTD_decompressSequencesLong’
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1982:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1983:16: branch_true: ...to here
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1983:16: call_function: calling ‘ZSTD_decompressSequencesLong_bmi2’ from ‘ZSTD_decompressSequencesLong’
# 1781| seq_t sequence = ZSTD_decodeSequence(&seqState, isLongOffset, seqNb == nbSeq-1);
# 1782|
# 1783|-> if (dctx->litBufferLocation == ZSTD_split && litPtr + sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK].litLength > dctx->litBufferEnd) {
# 1784| /* lit buffer is reaching split point, empty out the first buffer and transition to litExtraBuffer */
# 1785| const size_t leftoverLit = dctx->litBufferEnd - litPtr;
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1830:67: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘sequences[<unknown>].litLength’
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1975:1: enter_function: entry to ‘ZSTD_decompressSequencesLong’
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1982:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1986:10: branch_false: ...to here
zstd-1.5.7/lib/decompress/zstd_decompress_block.c:1986:10: call_function: calling ‘ZSTD_decompressSequencesLong_default’ from ‘ZSTD_decompressSequencesLong’
# 1828| for ( ; seqNb<nbSeq ; seqNb++) {
# 1829| seq_t *sequence = &(sequences[seqNb&STORED_SEQS_MASK]);
# 1830|-> if (dctx->litBufferLocation == ZSTD_split && litPtr + sequence->litLength > dctx->litBufferEnd) {
# 1831| const size_t leftoverLit = dctx->litBufferEnd - litPtr;
# 1832| if (leftoverLit) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:649:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.dmerAt’
zstd-1.5.7/lib/dictBuilder/cover.c:779:28: enter_function: entry to ‘ZDICT_trainFromBuffer_cover’
zstd-1.5.7/lib/dictBuilder/cover.c:795:6: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:795:6: branch_false: following ‘false’ branch (when ‘nbSamples != 0’)...
zstd-1.5.7/lib/dictBuilder/cover.c:799:6: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:799:6: branch_false: following ‘false’ branch (when ‘dictBufferCapacity > 255’)...
zstd-1.5.7/lib/dictBuilder/cover.c:806:28: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:806:28: call_function: calling ‘COVER_ctx_init’ from ‘ZDICT_trainFromBuffer_cover’
# 647| ctx->offsets = (size_t *)malloc((nbSamples + 1) * sizeof(size_t));
# 648| if (!ctx->suffix || !ctx->dmerAt || !ctx->offsets) {
# 649|-> DISPLAYLEVEL(1, "Failed to allocate scratch buffers\n");
# 650| COVER_ctx_destroy(ctx);
# 651| return ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:649:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.offsets’
zstd-1.5.7/lib/dictBuilder/cover.c:779:28: enter_function: entry to ‘ZDICT_trainFromBuffer_cover’
zstd-1.5.7/lib/dictBuilder/cover.c:795:6: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:795:6: branch_false: following ‘false’ branch (when ‘nbSamples != 0’)...
zstd-1.5.7/lib/dictBuilder/cover.c:799:6: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:799:6: branch_false: following ‘false’ branch (when ‘dictBufferCapacity > 255’)...
zstd-1.5.7/lib/dictBuilder/cover.c:806:28: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:806:28: call_function: calling ‘COVER_ctx_init’ from ‘ZDICT_trainFromBuffer_cover’
# 647| ctx->offsets = (size_t *)malloc((nbSamples + 1) * sizeof(size_t));
# 648| if (!ctx->suffix || !ctx->dmerAt || !ctx->offsets) {
# 649|-> DISPLAYLEVEL(1, "Failed to allocate scratch buffers\n");
# 650| COVER_ctx_destroy(ctx);
# 651| return ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:649:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.suffix’
zstd-1.5.7/lib/dictBuilder/cover.c:779:28: enter_function: entry to ‘ZDICT_trainFromBuffer_cover’
zstd-1.5.7/lib/dictBuilder/cover.c:795:6: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:795:6: branch_false: following ‘false’ branch (when ‘nbSamples != 0’)...
zstd-1.5.7/lib/dictBuilder/cover.c:799:6: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:799:6: branch_false: following ‘false’ branch (when ‘dictBufferCapacity > 255’)...
zstd-1.5.7/lib/dictBuilder/cover.c:806:28: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:806:28: call_function: calling ‘COVER_ctx_init’ from ‘ZDICT_trainFromBuffer_cover’
# 647| ctx->offsets = (size_t *)malloc((nbSamples + 1) * sizeof(size_t));
# 648| if (!ctx->suffix || !ctx->dmerAt || !ctx->offsets) {
# 649|-> DISPLAYLEVEL(1, "Failed to allocate scratch buffers\n");
# 650| COVER_ctx_destroy(ctx);
# 651| return ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:739:3: warning[-Wanalyzer-malloc-leak]: leak of ‘activeDmers.data’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
# 737| size_t zeroScoreRun = 0;
# 738| size_t epoch;
# 739|-> DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n",
# 740| (U32)epochs.num, (U32)epochs.size);
# 741| /* Loop through the epochs until there are no more segments or the dictionary
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:739:3: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1132:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
# 737| size_t zeroScoreRun = 0;
# 738| size_t epoch;
# 739|-> DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n",
# 740| (U32)epochs.num, (U32)epochs.size);
# 741| /* Loop through the epochs until there are no more segments or the dictionary
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:739:3: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1134:28: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
# 737| size_t zeroScoreRun = 0;
# 738| size_t epoch;
# 739|-> DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n",
# 740| (U32)epochs.num, (U32)epochs.size);
# 741| /* Loop through the epochs until there are no more segments or the dictionary
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:775:3: warning[-Wanalyzer-malloc-leak]: leak of ‘activeDmers.data’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
# 773| (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity));
# 774| }
# 775|-> DISPLAYLEVEL(2, "\r%79s\r", "");
# 776| return tail;
# 777| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:775:3: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1132:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
# 773| (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity));
# 774| }
# 775|-> DISPLAYLEVEL(2, "\r%79s\r", "");
# 776| return tail;
# 777| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:775:3: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1134:28: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
# 773| (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity));
# 774| }
# 775|-> DISPLAYLEVEL(2, "\r%79s\r", "");
# 776| return tail;
# 777| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:859:19: warning[-Wanalyzer-malloc-leak]: leak of ‘candidateDictBuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1020:23: enter_function: entry to ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1029:38: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1044:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: call_function: calling ‘COVER_checkTotalCompressedSize’ from ‘COVER_selectDict’
# 857| maxSampleSize = MAX(samplesSizes[i], maxSampleSize);
# 858| }
# 859|-> dstCapacity = ZSTD_compressBound(maxSampleSize);
# 860| dst = malloc(dstCapacity);
# 861| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:863:10: warning[-Wanalyzer-malloc-leak]: leak of ‘candidateDictBuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1020:23: enter_function: entry to ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1029:38: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1044:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: call_function: calling ‘COVER_checkTotalCompressedSize’ from ‘COVER_selectDict’
# 861| }
# 862| /* Create the cctx and cdict */
# 863|-> cctx = ZSTD_createCCtx();
# 864| cdict = ZSTD_createCDict(dict, dictBufferCapacity,
# 865| parameters.zParams.compressionLevel);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:863:10: warning[-Wanalyzer-malloc-leak]: leak of ‘dst’
zstd-1.5.7/lib/dictBuilder/cover.c:860:11: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:863:10: danger: ‘dst’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 861| }
# 862| /* Create the cctx and cdict */
# 863|-> cctx = ZSTD_createCCtx();
# 864| cdict = ZSTD_createCDict(dict, dictBufferCapacity,
# 865| parameters.zParams.compressionLevel);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:864:11: warning[-Wanalyzer-malloc-leak]: leak of ‘candidateDictBuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1020:23: enter_function: entry to ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1029:38: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1044:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: call_function: calling ‘COVER_checkTotalCompressedSize’ from ‘COVER_selectDict’
# 862| /* Create the cctx and cdict */
# 863| cctx = ZSTD_createCCtx();
# 864|-> cdict = ZSTD_createCDict(dict, dictBufferCapacity,
# 865| parameters.zParams.compressionLevel);
# 866| if (!dst || !cctx || !cdict) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:864:11: warning[-Wanalyzer-malloc-leak]: leak of ‘dst’
zstd-1.5.7/lib/dictBuilder/cover.c:860:11: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:864:11: danger: ‘dst’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 862| /* Create the cctx and cdict */
# 863| cctx = ZSTD_createCCtx();
# 864|-> cdict = ZSTD_createCDict(dict, dictBufferCapacity,
# 865| parameters.zParams.compressionLevel);
# 866| if (!dst || !cctx || !cdict) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:873:25: warning[-Wanalyzer-malloc-leak]: leak of ‘candidateDictBuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1020:23: enter_function: entry to ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1029:38: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1044:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: call_function: calling ‘COVER_checkTotalCompressedSize’ from ‘COVER_selectDict’
# 871| i = parameters.splitPoint < 1.0 ? nbTrainSamples : 0;
# 872| for (; i < nbSamples; ++i) {
# 873|-> const size_t size = ZSTD_compress_usingCDict(
# 874| cctx, dst, dstCapacity, samples + offsets[i],
# 875| samplesSizes[i], cdict);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:873:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dst’
zstd-1.5.7/lib/dictBuilder/cover.c:860:11: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:866:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:872:10: branch_true: following ‘true’ branch (when ‘i < nbSamples’)...
zstd-1.5.7/lib/dictBuilder/cover.c:875:21: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:873:25: danger: ‘dst’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 871| i = parameters.splitPoint < 1.0 ? nbTrainSamples : 0;
# 872| for (; i < nbSamples; ++i) {
# 873|-> const size_t size = ZSTD_compress_usingCDict(
# 874| cctx, dst, dstCapacity, samples + offsets[i],
# 875| samplesSizes[i], cdict);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:883:3: warning[-Wanalyzer-malloc-leak]: leak of ‘candidateDictBuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1020:23: enter_function: entry to ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1029:38: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1044:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: call_function: calling ‘COVER_checkTotalCompressedSize’ from ‘COVER_selectDict’
# 881| }
# 882| _compressCleanup:
# 883|-> ZSTD_freeCCtx(cctx);
# 884| ZSTD_freeCDict(cdict);
# 885| if (dst) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:883:3: warning[-Wanalyzer-malloc-leak]: leak of ‘dst’
zstd-1.5.7/lib/dictBuilder/cover.c:860:11: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:866:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:867:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:883:3: danger: ‘dst’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 881| }
# 882| _compressCleanup:
# 883|-> ZSTD_freeCCtx(cctx);
# 884| ZSTD_freeCDict(cdict);
# 885| if (dst) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:884:3: warning[-Wanalyzer-malloc-leak]: leak of ‘candidateDictBuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1020:23: enter_function: entry to ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1029:38: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1044:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1050:25: call_function: calling ‘COVER_checkTotalCompressedSize’ from ‘COVER_selectDict’
# 882| _compressCleanup:
# 883| ZSTD_freeCCtx(cctx);
# 884|-> ZSTD_freeCDict(cdict);
# 885| if (dst) {
# 886| free(dst);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:884:3: warning[-Wanalyzer-malloc-leak]: leak of ‘dst’
zstd-1.5.7/lib/dictBuilder/cover.c:860:11: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:866:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:867:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:884:3: danger: ‘dst’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 882| _compressCleanup:
# 883| ZSTD_freeCCtx(cctx);
# 884|-> ZSTD_freeCDict(cdict);
# 885| if (dst) {
# 886| free(dst);
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘customDictContent’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_buildDictionary’
zstd-1.5.7/lib/dictBuilder/cover.c:1149:17: call_function: calling ‘COVER_selectDict’ from ‘COVER_tryParameters’
# 1037|
# 1038| /* Initial dictionary size and compressed size */
# 1039|-> memcpy(largestDictbuffer, customDictContent, dictContentSize);
# 1040| dictContentSize = ZDICT_finalizeDictionary(
# 1041| largestDictbuffer, dictBufferCapacity, customDictContent, dictContentSize,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1040:21: warning[-Wanalyzer-malloc-leak]: leak of ‘candidateDictBuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1029:38: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1040:21: danger: ‘candidateDictBuffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
# 1038| /* Initial dictionary size and compressed size */
# 1039| memcpy(largestDictbuffer, customDictContent, dictContentSize);
# 1040|-> dictContentSize = ZDICT_finalizeDictionary(
# 1041| largestDictbuffer, dictBufferCapacity, customDictContent, dictContentSize,
# 1042| samplesBuffer, samplesSizes, nbFinalizeSamples, params.zParams);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1040:21: warning[-Wanalyzer-malloc-leak]: leak of ‘largestDictbuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1028:36: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1040:21: danger: ‘largestDictbuffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 1038| /* Initial dictionary size and compressed size */
# 1039| memcpy(largestDictbuffer, customDictContent, dictContentSize);
# 1040|-> dictContentSize = ZDICT_finalizeDictionary(
# 1041| largestDictbuffer, dictBufferCapacity, customDictContent, dictContentSize,
# 1042| samplesBuffer, samplesSizes, nbFinalizeSamples, params.zParams);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1044:7: warning[-Wanalyzer-malloc-leak]: leak of ‘candidateDictBuffer’
zstd-1.5.7/lib/dictBuilder/cover.c:1029:38: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1032:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1039:3: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1044:7: danger: ‘candidateDictBuffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
# 1042| samplesBuffer, samplesSizes, nbFinalizeSamples, params.zParams);
# 1043|
# 1044|-> if (ZDICT_isError(dictContentSize)) {
# 1045| free(largestDictbuffer);
# 1046| free(candidateDictBuffer);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1132:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: danger: ‘dict’ leaks here; was allocated at [(2)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/1)
# 1134| U32* const freqs = (U32*)malloc(ctx->suffixSize * sizeof(U32));
# 1135| if (!COVER_map_init(&activeDmers, parameters.k - parameters.d + 1)) {
# 1136|-> DISPLAYLEVEL(1, "Failed to allocate dmer map: out of memory\n");
# 1137| goto _cleanup;
# 1138| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1134:28: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1136:5: danger: ‘freqs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/1)
# 1134| U32* const freqs = (U32*)malloc(ctx->suffixSize * sizeof(U32));
# 1135| if (!COVER_map_init(&activeDmers, parameters.k - parameters.d + 1)) {
# 1136|-> DISPLAYLEVEL(1, "Failed to allocate dmer map: out of memory\n");
# 1137| goto _cleanup;
# 1138| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: warning[-Wanalyzer-malloc-leak]: leak of ‘activeDmers.data’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: danger: ‘activeDmers.data’ leaks here; was allocated at [(4)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/3)
# 1138| }
# 1139| if (!dict || !freqs) {
# 1140|-> DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n");
# 1141| goto _cleanup;
# 1142| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1132:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: danger: ‘dict’ leaks here; was allocated at [(2)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/1)
# 1138| }
# 1139| if (!dict || !freqs) {
# 1140|-> DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n");
# 1141| goto _cleanup;
# 1142| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1134:28: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1140:5: danger: ‘freqs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/1)
# 1138| }
# 1139| if (!dict || !freqs) {
# 1140|-> DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n");
# 1141| goto _cleanup;
# 1142| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: warning[-Wanalyzer-malloc-leak]: leak of ‘activeDmers.data’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_buildDictionary’
zstd-1.5.7/lib/dictBuilder/cover.c:1149:17: call_function: calling ‘COVER_selectDict’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1149:17: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:9: call_function: calling ‘COVER_dictSelectionIsError’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:9: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_dictSelectionIsError’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: danger: ‘activeDmers.data’ leaks here; was allocated at [(4)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/3)
# 1152|
# 1153| if (COVER_dictSelectionIsError(selection)) {
# 1154|-> DISPLAYLEVEL(1, "Failed to select dictionary\n");
# 1155| goto _cleanup;
# 1156| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1132:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_buildDictionary’
zstd-1.5.7/lib/dictBuilder/cover.c:1149:17: call_function: calling ‘COVER_selectDict’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1149:17: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:9: call_function: calling ‘COVER_dictSelectionIsError’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:9: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_dictSelectionIsError’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: danger: ‘dict’ leaks here; was allocated at [(2)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/1)
# 1152|
# 1153| if (COVER_dictSelectionIsError(selection)) {
# 1154|-> DISPLAYLEVEL(1, "Failed to select dictionary\n");
# 1155| goto _cleanup;
# 1156| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/cover.c:1122:13: enter_function: entry to ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1134:28: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: call_function: calling ‘COVER_map_init’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:8: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_map_init’
zstd-1.5.7/lib/dictBuilder/cover.c:1135:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1139:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1139:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1144:29: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: call_function: calling ‘COVER_buildDictionary’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1147:25: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_buildDictionary’
zstd-1.5.7/lib/dictBuilder/cover.c:1149:17: call_function: calling ‘COVER_selectDict’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1149:17: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_selectDict’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:9: call_function: calling ‘COVER_dictSelectionIsError’ from ‘COVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:9: return_function: returning to ‘COVER_tryParameters’ from ‘COVER_dictSelectionIsError’
zstd-1.5.7/lib/dictBuilder/cover.c:1153:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/cover.c:1154:7: danger: ‘freqs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/1)
# 1152|
# 1153| if (COVER_dictSelectionIsError(selection)) {
# 1154|-> DISPLAYLEVEL(1, "Failed to select dictionary\n");
# 1155| goto _cleanup;
# 1156| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:409:37: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:484:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 407| size_t tail = dictBufferCapacity;
# 408| /* Divide the data into epochs. We will select one segment from each epoch. */
# 409|-> const COVER_epoch_info_t epochs = COVER_computeEpochs(
# 410| (U32)dictBufferCapacity, (U32)ctx->nbDmers, parameters.k, 1);
# 411| const size_t maxZeroScoreRun = 10;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:409:37: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: following ‘false’ branch (when ‘freqs’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/fastcover.c:492:17: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 407| size_t tail = dictBufferCapacity;
# 408| /* Divide the data into epochs. We will select one segment from each epoch. */
# 409|-> const COVER_epoch_info_t epochs = COVER_computeEpochs(
# 410| (U32)dictBufferCapacity, (U32)ctx->nbDmers, parameters.k, 1);
# 411| const size_t maxZeroScoreRun = 10;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:409:37: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 407| size_t tail = dictBufferCapacity;
# 408| /* Divide the data into epochs. We will select one segment from each epoch. */
# 409|-> const COVER_epoch_info_t epochs = COVER_computeEpochs(
# 410| (U32)dictBufferCapacity, (U32)ctx->nbDmers, parameters.k, 1);
# 411| const size_t maxZeroScoreRun = 10;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:414:3: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:484:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 412| size_t zeroScoreRun = 0;
# 413| size_t epoch;
# 414|-> DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n",
# 415| (U32)epochs.num, (U32)epochs.size);
# 416| /* Loop through the epochs until there are no more segments or the dictionary
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:414:3: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: following ‘false’ branch (when ‘freqs’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/fastcover.c:492:17: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 412| size_t zeroScoreRun = 0;
# 413| size_t epoch;
# 414|-> DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n",
# 415| (U32)epochs.num, (U32)epochs.size);
# 416| /* Loop through the epochs until there are no more segments or the dictionary
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:414:3: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 412| size_t zeroScoreRun = 0;
# 413| size_t epoch;
# 414|-> DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n",
# 415| (U32)epochs.num, (U32)epochs.size);
# 416| /* Loop through the epochs until there are no more segments or the dictionary
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:453:3: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:484:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 451| (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity));
# 452| }
# 453|-> DISPLAYLEVEL(2, "\r%79s\r", "");
# 454| return tail;
# 455| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:453:3: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: following ‘false’ branch (when ‘freqs’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/fastcover.c:492:17: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 451| (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity));
# 452| }
# 453|-> DISPLAYLEVEL(2, "\r%79s\r", "");
# 454| return tail;
# 455| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:453:3: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
# 451| (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity));
# 452| }
# 453|-> DISPLAYLEVEL(2, "\r%79s\r", "");
# 454| return tail;
# 455| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:485:37: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/fastcover.c:484:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:485:37: danger: ‘dict’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 483| /* Allocate space for hash table, dict, and freqs */
# 484| BYTE *const dict = (BYTE*)malloc(dictBufferCapacity);
# 485|-> COVER_dictSelection_t selection = COVER_dictSelectionError(ERROR(GENERIC));
# 486| U32* freqs = (U32*) malloc(((U64)1 << ctx->f) * sizeof(U32));
# 487| if (!segmentFreqs || !dict || !freqs) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:485:37: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:485:37: danger: ‘segmentFreqs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 483| /* Allocate space for hash table, dict, and freqs */
# 484| BYTE *const dict = (BYTE*)malloc(dictBufferCapacity);
# 485|-> COVER_dictSelection_t selection = COVER_dictSelectionError(ERROR(GENERIC));
# 486| U32* freqs = (U32*) malloc(((U64)1 << ctx->f) * sizeof(U32));
# 487| if (!segmentFreqs || !dict || !freqs) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/fastcover.c:484:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: danger: ‘dict’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 486| U32* freqs = (U32*) malloc(((U64)1 << ctx->f) * sizeof(U32));
# 487| if (!segmentFreqs || !dict || !freqs) {
# 488|-> DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n");
# 489| goto _cleanup;
# 490| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: danger: ‘freqs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 486| U32* freqs = (U32*) malloc(((U64)1 << ctx->f) * sizeof(U32));
# 487| if (!segmentFreqs || !dict || !freqs) {
# 488|-> DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n");
# 489| goto _cleanup;
# 490| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: danger: ‘segmentFreqs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 486| U32* freqs = (U32*) malloc(((U64)1 << ctx->f) * sizeof(U32));
# 487| if (!segmentFreqs || !dict || !freqs) {
# 488|-> DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n");
# 489| goto _cleanup;
# 490| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:498:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
zstd-1.5.7/lib/dictBuilder/fastcover.c:484:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:498:17: danger: ‘dict’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 496|
# 497| const unsigned nbFinalizeSamples = (unsigned)(ctx->nbTrainSamples * ctx->accelParams.finalize / 100);
# 498|-> selection = COVER_selectDict(dict + tail, dictBufferCapacity, dictBufferCapacity - tail,
# 499| ctx->samples, ctx->samplesSizes, nbFinalizeSamples, ctx->nbTrainSamples, ctx->nbSamples, parameters, ctx->offsets,
# 500| totalCompressedSize);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:498:17: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: following ‘false’ branch (when ‘freqs’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/fastcover.c:492:17: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:498:17: danger: ‘freqs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 496|
# 497| const unsigned nbFinalizeSamples = (unsigned)(ctx->nbTrainSamples * ctx->accelParams.finalize / 100);
# 498|-> selection = COVER_selectDict(dict + tail, dictBufferCapacity, dictBufferCapacity - tail,
# 499| ctx->samples, ctx->samplesSizes, nbFinalizeSamples, ctx->nbTrainSamples, ctx->nbSamples, parameters, ctx->offsets,
# 500| totalCompressedSize);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:498:17: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:498:17: danger: ‘segmentFreqs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 496|
# 497| const unsigned nbFinalizeSamples = (unsigned)(ctx->nbTrainSamples * ctx->accelParams.finalize / 100);
# 498|-> selection = COVER_selectDict(dict + tail, dictBufferCapacity, dictBufferCapacity - tail,
# 499| ctx->samples, ctx->samplesSizes, nbFinalizeSamples, ctx->nbTrainSamples, ctx->nbSamples, parameters, ctx->offsets,
# 500| totalCompressedSize);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:502:9: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: following ‘false’ branch (when ‘freqs’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/fastcover.c:492:17: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: return_function: returning to ‘FASTCOVER_tryParameters’ from ‘FASTCOVER_buildDictionary’
zstd-1.5.7/lib/dictBuilder/fastcover.c:502:9: danger: ‘freqs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/1)
# 500| totalCompressedSize);
# 501|
# 502|-> if (COVER_dictSelectionIsError(selection)) {
# 503| DISPLAYLEVEL(1, "Failed to select dictionary\n");
# 504| goto _cleanup;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:502:9: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: return_function: returning to ‘FASTCOVER_tryParameters’ from ‘FASTCOVER_buildDictionary’
zstd-1.5.7/lib/dictBuilder/fastcover.c:502:9: danger: ‘segmentFreqs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/1)
# 500| totalCompressedSize);
# 501|
# 502|-> if (COVER_dictSelectionIsError(selection)) {
# 503| DISPLAYLEVEL(1, "Failed to select dictionary\n");
# 504| goto _cleanup;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:7: branch_false: following ‘false’ branch (when ‘freqs’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/fastcover.c:492:17: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: return_function: returning to ‘FASTCOVER_tryParameters’ from ‘FASTCOVER_buildDictionary’
zstd-1.5.7/lib/dictBuilder/fastcover.c:502:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: danger: ‘freqs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/1)
# 501|
# 502| if (COVER_dictSelectionIsError(selection)) {
# 503|-> DISPLAYLEVEL(1, "Failed to select dictionary\n");
# 504| goto _cleanup;
# 505| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:473:13: enter_function: entry to ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: call_function: calling ‘FASTCOVER_buildDictionary’ from ‘FASTCOVER_tryParameters’
zstd-1.5.7/lib/dictBuilder/fastcover.c:494:25: return_function: returning to ‘FASTCOVER_tryParameters’ from ‘FASTCOVER_buildDictionary’
zstd-1.5.7/lib/dictBuilder/fastcover.c:502:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:503:7: danger: ‘segmentFreqs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/1)
# 501|
# 502| if (COVER_dictSelectionIsError(selection)) {
# 503|-> DISPLAYLEVEL(1, "Failed to select dictionary\n");
# 504| goto _cleanup;
# 505| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:509:3: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:509:3: danger: ‘freqs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
# 507| _cleanup:
# 508| free(dict);
# 509|-> COVER_best_finish(data->best, parameters, selection);
# 510| free(data);
# 511| free(segmentFreqs);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:509:3: warning[-Wanalyzer-malloc-leak]: leak of ‘segmentFreqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:482:29: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:509:3: danger: ‘segmentFreqs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
# 507| _cleanup:
# 508| free(dict);
# 509|-> COVER_best_finish(data->best, parameters, selection);
# 510| free(data);
# 511| free(segmentFreqs);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/fastcover.c:512:3: warning[-Wanalyzer-malloc-leak]: leak of ‘freqs’
zstd-1.5.7/lib/dictBuilder/fastcover.c:486:23: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/fastcover.c:487:6: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/fastcover.c:488:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/fastcover.c:512:3: danger: ‘freqs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
# 510| free(data);
# 511| free(segmentFreqs);
# 512|-> COVER_dictSelectionFree(selection);
# 513| free(freqs);
# 514| }
Error: CPPCHECK_WARNING (CWE-682):
zstd-1.5.7/lib/dictBuilder/zdict.c:471: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 469| {
# 470| int* const suffix0 = (int*)malloc((bufferSize+2)*sizeof(*suffix0));
# 471|-> int* const suffix = suffix0+1;
# 472| U32* reverseSuffix = (U32*)malloc((bufferSize)*sizeof(*reverseSuffix));
# 473| BYTE* doneMarks = (BYTE*)malloc((bufferSize+16)*sizeof(*doneMarks)); /* +16 for overflow security */
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: warning[-Wanalyzer-malloc-leak]: leak of ‘dictList’
zstd-1.5.7/lib/dictBuilder/zdict.c:978:15: enter_function: entry to ‘ZDICT_trainFromBuffer_unsafe_legacy’
zstd-1.5.7/lib/dictBuilder/zdict.c:984:43: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:993:8: branch_false: following ‘false’ branch (when ‘dictList’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/zdict.c:994:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:994:8: branch_false: following ‘false’ branch (when ‘maxDictSize > 255’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:995:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:995:8: branch_false: following ‘false’ branch (when ‘total > 511’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:998:5: call_function: inlined call to ‘ZDICT_initDictItem’ from ‘ZDICT_trainFromBuffer_unsafe_legacy’
zstd-1.5.7/lib/dictBuilder/zdict.c:1001:5: call_function: calling ‘ZDICT_trainBuffer_legacy’ from ‘ZDICT_trainFromBuffer_unsafe_legacy’
# 490|
# 491| /* init */
# 492|-> DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */
# 493| if (!suffix0 || !reverseSuffix || !doneMarks || !filePos) {
# 494| result = ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: warning[-Wanalyzer-malloc-leak]: leak of ‘doneMarks’
zstd-1.5.7/lib/dictBuilder/zdict.c:473:30: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: danger: ‘doneMarks’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 490|
# 491| /* init */
# 492|-> DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */
# 493| if (!suffix0 || !reverseSuffix || !doneMarks || !filePos) {
# 494| result = ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: warning[-Wanalyzer-malloc-leak]: leak of ‘filePos’
zstd-1.5.7/lib/dictBuilder/zdict.c:474:26: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: danger: ‘filePos’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 490|
# 491| /* init */
# 492|-> DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */
# 493| if (!suffix0 || !reverseSuffix || !doneMarks || !filePos) {
# 494| result = ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: warning[-Wanalyzer-malloc-leak]: leak of ‘newBuff’
zstd-1.5.7/lib/dictBuilder/zdict.c:1084:8: enter_function: entry to ‘ZDICT_trainFromBuffer_legacy’
zstd-1.5.7/lib/dictBuilder/zdict.c:1091:8: branch_false: following ‘false’ branch (when ‘total > 511’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:1093:15: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:1093:15: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:1094:8: branch_false: following ‘false’ branch (when ‘newBuff’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/zdict.c:1096:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:1097:5: call_function: inlined call to ‘ZDICT_fillNoise’ from ‘ZDICT_trainFromBuffer_legacy’
zstd-1.5.7/lib/dictBuilder/zdict.c:1100:9: call_function: calling ‘ZDICT_trainFromBuffer_unsafe_legacy’ from ‘ZDICT_trainFromBuffer_legacy’
# 490|
# 491| /* init */
# 492|-> DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */
# 493| if (!suffix0 || !reverseSuffix || !doneMarks || !filePos) {
# 494| result = ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: warning[-Wanalyzer-malloc-leak]: leak of ‘reverseSuffix’
zstd-1.5.7/lib/dictBuilder/zdict.c:472:32: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: danger: ‘reverseSuffix’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 490|
# 491| /* init */
# 492|-> DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */
# 493| if (!suffix0 || !reverseSuffix || !doneMarks || !filePos) {
# 494| result = ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: warning[-Wanalyzer-malloc-leak]: leak of ‘suffix0’
zstd-1.5.7/lib/dictBuilder/zdict.c:470:32: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:492:5: danger: ‘suffix0’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 490|
# 491| /* init */
# 492|-> DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */
# 493| if (!suffix0 || !reverseSuffix || !doneMarks || !filePos) {
# 494| result = ERROR(memory_allocation);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: warning[-Wanalyzer-malloc-leak]: leak of ‘dictList’
zstd-1.5.7/lib/dictBuilder/zdict.c:978:15: enter_function: entry to ‘ZDICT_trainFromBuffer_unsafe_legacy’
zstd-1.5.7/lib/dictBuilder/zdict.c:984:43: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:993:8: branch_false: following ‘false’ branch (when ‘dictList’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/zdict.c:994:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:994:8: branch_false: following ‘false’ branch (when ‘maxDictSize > 255’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:995:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:995:8: branch_false: following ‘false’ branch (when ‘total > 511’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:998:5: call_function: inlined call to ‘ZDICT_initDictItem’ from ‘ZDICT_trainFromBuffer_unsafe_legacy’
zstd-1.5.7/lib/dictBuilder/zdict.c:1001:5: call_function: calling ‘ZDICT_trainBuffer_legacy’ from ‘ZDICT_trainFromBuffer_unsafe_legacy’
# 499|
# 500| /* limit sample set size (divsufsort limitation)*/
# 501|-> if (bufferSize > ZDICT_MAX_SAMPLES_SIZE) DISPLAYLEVEL(3, "sample set too large : reduced to %u MB ...\n", (unsigned)(ZDICT_MAX_SAMPLES_SIZE>>20));
# 502| while (bufferSize > ZDICT_MAX_SAMPLES_SIZE) bufferSize -= fileSizes[--nbFiles];
# 503|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: warning[-Wanalyzer-malloc-leak]: leak of ‘doneMarks’
zstd-1.5.7/lib/dictBuilder/zdict.c:473:30: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:493:39: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:9: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:497:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:501:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: danger: ‘doneMarks’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 499|
# 500| /* limit sample set size (divsufsort limitation)*/
# 501|-> if (bufferSize > ZDICT_MAX_SAMPLES_SIZE) DISPLAYLEVEL(3, "sample set too large : reduced to %u MB ...\n", (unsigned)(ZDICT_MAX_SAMPLES_SIZE>>20));
# 502| while (bufferSize > ZDICT_MAX_SAMPLES_SIZE) bufferSize -= fileSizes[--nbFiles];
# 503|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: warning[-Wanalyzer-malloc-leak]: leak of ‘filePos’
zstd-1.5.7/lib/dictBuilder/zdict.c:474:26: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:493:39: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:9: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:497:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:501:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: danger: ‘filePos’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 499|
# 500| /* limit sample set size (divsufsort limitation)*/
# 501|-> if (bufferSize > ZDICT_MAX_SAMPLES_SIZE) DISPLAYLEVEL(3, "sample set too large : reduced to %u MB ...\n", (unsigned)(ZDICT_MAX_SAMPLES_SIZE>>20));
# 502| while (bufferSize > ZDICT_MAX_SAMPLES_SIZE) bufferSize -= fileSizes[--nbFiles];
# 503|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: warning[-Wanalyzer-malloc-leak]: leak of ‘reverseSuffix’
zstd-1.5.7/lib/dictBuilder/zdict.c:472:32: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:501:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: danger: ‘reverseSuffix’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 499|
# 500| /* limit sample set size (divsufsort limitation)*/
# 501|-> if (bufferSize > ZDICT_MAX_SAMPLES_SIZE) DISPLAYLEVEL(3, "sample set too large : reduced to %u MB ...\n", (unsigned)(ZDICT_MAX_SAMPLES_SIZE>>20));
# 502| while (bufferSize > ZDICT_MAX_SAMPLES_SIZE) bufferSize -= fileSizes[--nbFiles];
# 503|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: warning[-Wanalyzer-malloc-leak]: leak of ‘suffix0’
zstd-1.5.7/lib/dictBuilder/zdict.c:470:32: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:501:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:501:46: danger: ‘suffix0’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 499|
# 500| /* limit sample set size (divsufsort limitation)*/
# 501|-> if (bufferSize > ZDICT_MAX_SAMPLES_SIZE) DISPLAYLEVEL(3, "sample set too large : reduced to %u MB ...\n", (unsigned)(ZDICT_MAX_SAMPLES_SIZE>>20));
# 502| while (bufferSize > ZDICT_MAX_SAMPLES_SIZE) bufferSize -= fileSizes[--nbFiles];
# 503|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: warning[-Wanalyzer-malloc-leak]: leak of ‘doneMarks’
zstd-1.5.7/lib/dictBuilder/zdict.c:473:30: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:493:39: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:9: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:497:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: danger: ‘doneMarks’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 503|
# 504| /* sort */
# 505|-> DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506| { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: warning[-Wanalyzer-malloc-leak]: leak of ‘filePos’
zstd-1.5.7/lib/dictBuilder/zdict.c:474:26: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:493:39: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:9: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:497:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: danger: ‘filePos’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 503|
# 504| /* sort */
# 505|-> DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506| { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: warning[-Wanalyzer-malloc-leak]: leak of ‘reverseSuffix’
zstd-1.5.7/lib/dictBuilder/zdict.c:472:32: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: danger: ‘reverseSuffix’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 503|
# 504| /* sort */
# 505|-> DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506| { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: warning[-Wanalyzer-malloc-leak]: leak of ‘suffix0’
zstd-1.5.7/lib/dictBuilder/zdict.c:470:32: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:505:5: danger: ‘suffix0’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 503|
# 504| /* sort */
# 505|-> DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506| { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: warning[-Wanalyzer-malloc-leak]: leak of ‘dictList’
zstd-1.5.7/lib/dictBuilder/zdict.c:978:15: enter_function: entry to ‘ZDICT_trainFromBuffer_unsafe_legacy’
zstd-1.5.7/lib/dictBuilder/zdict.c:984:43: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:993:8: branch_false: following ‘false’ branch (when ‘dictList’ is non-NULL)...
zstd-1.5.7/lib/dictBuilder/zdict.c:994:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:994:8: branch_false: following ‘false’ branch (when ‘maxDictSize > 255’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:995:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:995:8: branch_false: following ‘false’ branch (when ‘total > 511’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:998:5: call_function: inlined call to ‘ZDICT_initDictItem’ from ‘ZDICT_trainFromBuffer_unsafe_legacy’
zstd-1.5.7/lib/dictBuilder/zdict.c:1001:5: call_function: calling ‘ZDICT_trainBuffer_legacy’ from ‘ZDICT_trainFromBuffer_unsafe_legacy’
# 504| /* sort */
# 505| DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506|-> { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
# 508| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: warning[-Wanalyzer-malloc-leak]: leak of ‘doneMarks’
zstd-1.5.7/lib/dictBuilder/zdict.c:473:30: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:493:39: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:9: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:497:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: danger: ‘doneMarks’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 504| /* sort */
# 505| DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506|-> { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
# 508| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: warning[-Wanalyzer-malloc-leak]: leak of ‘filePos’
zstd-1.5.7/lib/dictBuilder/zdict.c:474:26: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:493:39: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:9: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:497:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: danger: ‘filePos’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 504| /* sort */
# 505| DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506|-> { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
# 508| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: warning[-Wanalyzer-malloc-leak]: leak of ‘reverseSuffix’
zstd-1.5.7/lib/dictBuilder/zdict.c:472:32: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: danger: ‘reverseSuffix’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 504| /* sort */
# 505| DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506|-> { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
# 508| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: warning[-Wanalyzer-malloc-leak]: leak of ‘suffix0’
zstd-1.5.7/lib/dictBuilder/zdict.c:470:32: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:493:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:506:39: danger: ‘suffix0’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 504| /* sort */
# 505| DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20));
# 506|-> { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0);
# 507| if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; }
# 508| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:575:34: warning[-Wanalyzer-malloc-leak]: leak of ‘esr.workPlace’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_true: following ‘true’ branch (when ‘u < nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:712:65: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:710:9: call_function: calling ‘ZDICT_countEStats’ from ‘ZDICT_analyzeEntropy’
# 573|
# 574| if (srcSize > blockSizeMax) srcSize = blockSizeMax; /* protection vs large samples */
# 575|-> { size_t const errorCode = ZSTD_compressBegin_usingCDict_deprecated(esr.zc, esr.dict);
# 576| if (ZSTD_isError(errorCode)) { DISPLAYLEVEL(1, "warning : ZSTD_compressBegin_usingCDict failed \n"); return; }
# 577|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:576:40: warning[-Wanalyzer-malloc-leak]: leak of ‘esr.workPlace’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_true: following ‘true’ branch (when ‘u < nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:712:65: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:710:9: call_function: calling ‘ZDICT_countEStats’ from ‘ZDICT_analyzeEntropy’
# 574| if (srcSize > blockSizeMax) srcSize = blockSizeMax; /* protection vs large samples */
# 575| { size_t const errorCode = ZSTD_compressBegin_usingCDict_deprecated(esr.zc, esr.dict);
# 576|-> if (ZSTD_isError(errorCode)) { DISPLAYLEVEL(1, "warning : ZSTD_compressBegin_usingCDict failed \n"); return; }
# 577|
# 578| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:579:13: warning[-Wanalyzer-malloc-leak]: leak of ‘esr.workPlace’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_true: following ‘true’ branch (when ‘u < nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:712:65: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:710:9: call_function: calling ‘ZDICT_countEStats’ from ‘ZDICT_analyzeEntropy’
# 577|
# 578| }
# 579|-> cSize = ZSTD_compressBlock_deprecated(esr.zc, esr.workPlace, ZSTD_BLOCKSIZE_MAX, src, srcSize);
# 580| if (ZSTD_isError(cSize)) { DISPLAYLEVEL(3, "warning : could not compress sample size %u \n", (unsigned)srcSize); return; }
# 581|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:704:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:704:9: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:704:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:704:9: danger: ‘malloc(131072)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/8)
# 702| if (!esr.dict || !esr.zc || !esr.workPlace) {
# 703| eSize = ERROR(memory_allocation);
# 704|-> DISPLAYLEVEL(1, "Not enough memory \n");
# 705| goto _cleanup;
# 706| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:719:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_true: following ‘true’ branch (when ‘notificationLevel > 3’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:719:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:719:9: danger: ‘malloc(131072)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/8)
# 717| if (notificationLevel >= 4) {
# 718| /* writeStats */
# 719|-> DISPLAYLEVEL(4, "Offset Code Frequencies : \n");
# 720| for (u=0; u<=offcodeMax; u++) {
# 721| DISPLAYLEVEL(4, "%2u :%7u \n", u, offcodeCount[u]);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:721:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_true: following ‘true’ branch (when ‘notificationLevel > 3’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:719:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:720:19: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:721:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:721:13: danger: ‘malloc(131072)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/8)
# 719| DISPLAYLEVEL(4, "Offset Code Frequencies : \n");
# 720| for (u=0; u<=offcodeMax; u++) {
# 721|-> DISPLAYLEVEL(4, "%2u :%7u \n", u, offcodeCount[u]);
# 722| } }
# 723|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:725:28: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:725:28: danger: ‘malloc(131072)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/8)
# 723|
# 724| /* analyze, build stats, starting with literals */
# 725|-> { size_t maxNbBits = HUF_buildCTable_wksp(hufTable, countLit, 255, huffLog, wksp, sizeof(wksp));
# 726| if (HUF_isError(maxNbBits)) {
# 727| eSize = maxNbBits;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:728:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:728:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:728:13: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:728:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:728:13: danger: ‘malloc(131072)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/8)
# 726| if (HUF_isError(maxNbBits)) {
# 727| eSize = maxNbBits;
# 728|-> DISPLAYLEVEL(1, " HUF_buildCTable error \n");
# 729| goto _cleanup;
# 730| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:732:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:732:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:732:13: branch_true: following ‘true’ branch (when ‘notificationLevel > 1’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:732:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:732:13: danger: ‘malloc(131072)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/8)
# 730| }
# 731| if (maxNbBits==8) { /* not compressible : will fail on HUF_writeCTable() */
# 732|-> DISPLAYLEVEL(2, "warning : pathological dataset : literals are not compressible : samples are noisy or too regular \n");
# 733| ZDICT_flatLit(countLit); /* replace distribution by a fake "mostly flat but still compressible" distribution, that HUF_writeCTable() can encode */
# 734| maxNbBits = HUF_buildCTable_wksp(hufTable, countLit, 255, huffLog, wksp, sizeof(wksp));
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:734:25: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:732:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:733:13: call_function: inlined call to ‘ZDICT_flatLit’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:734:25: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/9)
# 732| DISPLAYLEVEL(2, "warning : pathological dataset : literals are not compressible : samples are noisy or too regular \n");
# 733| ZDICT_flatLit(countLit); /* replace distribution by a fake "mostly flat but still compressible" distribution, that HUF_writeCTable() can encode */
# 734|-> maxNbBits = HUF_buildCTable_wksp(hufTable, countLit, 255, huffLog, wksp, sizeof(wksp));
# 735| assert(maxNbBits==9);
# 736| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:748:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:748:17: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/9)
# 746|
# 747| total=0; for (u=0; u<=offcodeMax; u++) total+=offcodeCount[u];
# 748|-> errorCode = FSE_normalizeCount(offcodeNCount, Offlog, offcodeCount, total, offcodeMax, /* useLowProbCount */ 1);
# 749| if (FSE_isError(errorCode)) {
# 750| eSize = errorCode;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:751:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:751:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:751:9: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:751:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:751:9: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/9)
# 749| if (FSE_isError(errorCode)) {
# 750| eSize = errorCode;
# 751|-> DISPLAYLEVEL(1, "FSE_normalizeCount error with offcodeCount \n");
# 752| goto _cleanup;
# 753| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:757:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:757:17: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/9)
# 755|
# 756| total=0; for (u=0; u<=MaxML; u++) total+=matchLengthCount[u];
# 757|-> errorCode = FSE_normalizeCount(matchLengthNCount, mlLog, matchLengthCount, total, MaxML, /* useLowProbCount */ 1);
# 758| if (FSE_isError(errorCode)) {
# 759| eSize = errorCode;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:760:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:760:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:760:9: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:760:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:760:9: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/9)
# 758| if (FSE_isError(errorCode)) {
# 759| eSize = errorCode;
# 760|-> DISPLAYLEVEL(1, "FSE_normalizeCount error with matchLengthCount \n");
# 761| goto _cleanup;
# 762| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:766:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:766:17: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/9)
# 764|
# 765| total=0; for (u=0; u<=MaxLL; u++) total+=litLengthCount[u];
# 766|-> errorCode = FSE_normalizeCount(litLengthNCount, llLog, litLengthCount, total, MaxLL, /* useLowProbCount */ 1);
# 767| if (FSE_isError(errorCode)) {
# 768| eSize = errorCode;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:769:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:769:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:769:9: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:769:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:769:9: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/9)
# 767| if (FSE_isError(errorCode)) {
# 768| eSize = errorCode;
# 769|-> DISPLAYLEVEL(1, "FSE_normalizeCount error with litLengthCount \n");
# 770| goto _cleanup;
# 771| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:775:31: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:775:31: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/9)
# 773|
# 774| /* write result to buffer */
# 775|-> { size_t const hhSize = HUF_writeCTable_wksp(dstPtr, maxDstSize, hufTable, 255, huffLog, wksp, sizeof(wksp));
# 776| if (HUF_isError(hhSize)) {
# 777| eSize = hhSize;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:778:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:776:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:778:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:778:13: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:778:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:778:13: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/9)
# 776| if (HUF_isError(hhSize)) {
# 777| eSize = hhSize;
# 778|-> DISPLAYLEVEL(1, "HUF_writeCTable error \n");
# 779| goto _cleanup;
# 780| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:786:31: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:776:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:781:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:786:31: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/9)
# 784| }
# 785|
# 786|-> { size_t const ohSize = FSE_writeNCount(dstPtr, maxDstSize, offcodeNCount, OFFCODE_MAX, Offlog);
# 787| if (FSE_isError(ohSize)) {
# 788| eSize = ohSize;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:789:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:776:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:781:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:787:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:789:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:789:13: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:789:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:789:13: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/9)
# 787| if (FSE_isError(ohSize)) {
# 788| eSize = ohSize;
# 789|-> DISPLAYLEVEL(1, "FSE_writeNCount error with offcodeNCount \n");
# 790| goto _cleanup;
# 791| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:797:31: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:776:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:781:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:787:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:792:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:797:31: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/9)
# 795| }
# 796|
# 797|-> { size_t const mhSize = FSE_writeNCount(dstPtr, maxDstSize, matchLengthNCount, MaxML, mlLog);
# 798| if (FSE_isError(mhSize)) {
# 799| eSize = mhSize;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:800:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:776:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:781:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:787:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:792:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:798:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:800:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:800:13: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:800:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:800:13: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/9)
# 798| if (FSE_isError(mhSize)) {
# 799| eSize = mhSize;
# 800|-> DISPLAYLEVEL(1, "FSE_writeNCount error with matchLengthNCount \n");
# 801| goto _cleanup;
# 802| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:808:31: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:776:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:781:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:787:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:792:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:798:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:803:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:808:31: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/9)
# 806| }
# 807|
# 808|-> { size_t const lhSize = FSE_writeNCount(dstPtr, maxDstSize, litLengthNCount, MaxLL, llLog);
# 809| if (FSE_isError(lhSize)) {
# 810| eSize = lhSize;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:811:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:776:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:781:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:787:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:792:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:798:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:803:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:809:12: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:811:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:811:13: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:811:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:811:13: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/9)
# 809| if (FSE_isError(lhSize)) {
# 810| eSize = lhSize;
# 811|-> DISPLAYLEVEL(1, "FSE_writeNCount error with litlengthNCount \n");
# 812| goto _cleanup;
# 813| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:821:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131072)’
zstd-1.5.7/lib/dictBuilder/zdict.c:659:15: enter_function: entry to ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:702:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:702:9: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:709:15: branch_false: following ‘false’ branch (when ‘u >= nbFiles’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:717:8: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:726:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:731:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:737:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_true: following ‘true’ branch (when ‘offset != 1024’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: call_function: calling ‘ZDICT_insertSortCount’ from ‘ZDICT_analyzeEntropy’
zstd-1.5.7/lib/dictBuilder/zdict.c:743:13: return_function: returning to ‘ZDICT_analyzeEntropy’ from ‘ZDICT_insertSortCount’
zstd-1.5.7/lib/dictBuilder/zdict.c:742:24: branch_false: following ‘false’ branch (when ‘offset == 1024’)...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:749:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:754:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:756:24: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:756:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:758:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:763:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:765:24: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:765:46: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:767:8: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:772:5: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:776:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:781:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:787:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:792:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:798:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:803:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:809:12: branch_false: following ‘false’ branch...
zstd-1.5.7/lib/dictBuilder/zdict.c:814:9: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:819:8: branch_true: following ‘true’ branch (when ‘maxDstSize <= 11’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:821:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:821:9: branch_true: following ‘true’ branch (when ‘notificationLevel != 0’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:821:9: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:821:9: danger: ‘malloc(131072)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/9)
# 819| if (maxDstSize<12) {
# 820| eSize = ERROR(dstSize_tooSmall);
# 821|-> DISPLAYLEVEL(1, "not enough space to write RepOffsets \n");
# 822| goto _cleanup;
# 823| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:838:5: warning[-Wanalyzer-malloc-leak]: leak of ‘esr.workPlace’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:838:5: danger: ‘esr.workPlace’ leaks here; was allocated at [(9)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/8)
# 836|
# 837| _cleanup:
# 838|-> ZSTD_freeCDict(esr.dict);
# 839| ZSTD_freeCCtx(esr.zc);
# 840| free(esr.workPlace);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/lib/dictBuilder/zdict.c:839:5: warning[-Wanalyzer-malloc-leak]: leak of ‘esr.workPlace’
zstd-1.5.7/lib/dictBuilder/zdict.c:688:8: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:689:15: branch_true: following ‘true’ branch (when ‘u != 256’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:689:27: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:691:15: branch_true: following ‘true’ branch (when ‘u != 53’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:691:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:692:15: branch_true: following ‘true’ branch (when ‘u != 36’)...
zstd-1.5.7/lib/dictBuilder/zdict.c:692:30: branch_true: ...to here
zstd-1.5.7/lib/dictBuilder/zdict.c:701:21: acquire_memory: allocated here
zstd-1.5.7/lib/dictBuilder/zdict.c:839:5: danger: ‘esr.workPlace’ leaks here; was allocated at [(9)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/8)
# 837| _cleanup:
# 838| ZSTD_freeCDict(esr.dict);
# 839|-> ZSTD_freeCCtx(esr.zc);
# 840| free(esr.workPlace);
# 841|
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v01.c:1496:5: warning[-Wmaybe-uninitialized]: ‘MEM <unsigned int> [(struct *)&litbp]’ may be used uninitialized
# 1496 | switch(litbp.blockType)
# | ^~~~~~
zstd-1.5.7/lib/legacy/zstd_v01.c: scope_hint: In function ‘ZSTD_decompressBlock’
zstd-1.5.7/lib/legacy/zstd_v01.c:1489:23: note: ‘MEM <unsigned int> [(struct *)&litbp]’ was declared here
# 1489 | blockProperties_t litbp;
# | ^~~~~
# 1494| ip += ZSTD_blockHeaderSize;
# 1495|
# 1496|-> switch(litbp.blockType)
# 1497| {
# 1498| case bt_raw:
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v01.c:1505:20: warning[-Wmaybe-uninitialized]: ‘litbp.origSize’ may be used uninitialized
# 1505 | size_t rleSize = litbp.origSize;
# | ^~~~~~~
zstd-1.5.7/lib/legacy/zstd_v01.c: scope_hint: In function ‘ZSTD_decompressBlock’
zstd-1.5.7/lib/legacy/zstd_v01.c:1489:23: note: ‘litbp.origSize’ was declared here
# 1489 | blockProperties_t litbp;
# | ^~~~~
# 1503| case bt_rle:
# 1504| {
# 1505|-> size_t rleSize = litbp.origSize;
# 1506| if (rleSize>maxDstSize) return ERROR(dstSize_tooSmall);
# 1507| if (!srcSize) return ERROR(srcSize_wrong);
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v01.c:1850:35: warning[-Wmaybe-uninitialized]: ‘dumpsLength’ may be used uninitialized
# 1850 | seqState.dumpsEnd = dumps + dumpsLength;
# | ~~~~~~^~~~~~~~~~~~~
zstd-1.5.7/lib/legacy/zstd_v01.c: scope_hint: In function ‘ZSTD_decompressBlock’
zstd-1.5.7/lib/legacy/zstd_v01.c:1826:23: note: ‘dumpsLength’ was declared here
# 1826 | size_t errorCode, dumpsLength;
# | ^~~~~~~~~~~
# 1848| memset(&sequence, 0, sizeof(sequence));
# 1849| seqState.dumps = dumps;
# 1850|-> seqState.dumpsEnd = dumps + dumpsLength;
# 1851| seqState.prevOffset = 1;
# 1852| errorCode = FSE_initDStream(&(seqState.DStream), ip, iend-ip);
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v01.c:1850:35: warning[-Wmaybe-uninitialized]: ‘dumps’ may be used uninitialized
# 1850 | seqState.dumpsEnd = dumps + dumpsLength;
# | ~~~~~~^~~~~~~~~~~~~
zstd-1.5.7/lib/legacy/zstd_v01.c: scope_hint: In function ‘ZSTD_decompressBlock’
zstd-1.5.7/lib/legacy/zstd_v01.c:1830:17: note: ‘dumps’ was declared here
# 1830 | const BYTE* dumps;
# | ^~~~~
# 1848| memset(&sequence, 0, sizeof(sequence));
# 1849| seqState.dumps = dumps;
# 1850|-> seqState.dumpsEnd = dumps + dumpsLength;
# 1851| seqState.prevOffset = 1;
# 1852| errorCode = FSE_initDStream(&(seqState.DStream), ip, iend-ip);
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v01.c:1858:83: warning[-Wmaybe-uninitialized]: ‘nbSeq’ may be used uninitialized
# 1858 | for ( ; (FSE_reloadDStream(&(seqState.DStream)) <= FSE_DStream_completed) && (nbSeq>0) ; )
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
zstd-1.5.7/lib/legacy/zstd_v01.c: scope_hint: In function ‘ZSTD_decompressBlock’
zstd-1.5.7/lib/legacy/zstd_v01.c:1829:9: note: ‘nbSeq’ was declared here
# 1829 | int nbSeq;
# | ^~~~~
# 1856| FSE_initDState(&(seqState.stateML), &(seqState.DStream), DTableML);
# 1857|
# 1858|-> for ( ; (FSE_reloadDStream(&(seqState.DStream)) <= FSE_DStream_completed) && (nbSeq>0) ; )
# 1859| {
# 1860| size_t oneSeqSize;
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v01.c: scope_hint: In function ‘ZSTDv01_decompressDCtx’
zstd-1.5.7/lib/legacy/zstd_v01.c:1936:9: warning[-Wmaybe-uninitialized]: ‘MEM <unsigned int> [(struct *)&blockProperties]’ may be used uninitialized
# 1936 | switch(blockProperties.blockType)
# | ^~~~~~
zstd-1.5.7/lib/legacy/zstd_v01.c:1918:23: note: ‘MEM <unsigned int> [(struct *)&blockProperties]’ was declared here
# 1918 | blockProperties_t blockProperties;
# | ^~~~~~~~~~~~~~~
# 1934| if (blockSize > remainingSize) return ERROR(srcSize_wrong);
# 1935|
# 1936|-> switch(blockProperties.blockType)
# 1937| {
# 1938| case bt_compressed:
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v03.c:1527:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
zstd-1.5.7/lib/legacy/zstd_v03.c:3102:8: enter_function: entry to ‘ZSTDv03_decompressContinue’
zstd-1.5.7/lib/legacy/zstd_v03.c:3104:12: call_function: calling ‘ZSTD_decompressContinue’ from ‘ZSTDv03_decompressContinue’
# 1525| for (n=0; n<oSize; n++)
# 1526| {
# 1527|-> if (huffWeight[n] >= HUF_ABSOLUTEMAX_TABLELOG) return ERROR(corruption_detected);
# 1528| rankStats[huffWeight[n]]++;
# 1529| weightTotal += (1 << huffWeight[n]) >> 1;
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v04.c:2328:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘Dtime[1]’
zstd-1.5.7/lib/legacy/zstd_v04.c:3591:8: enter_function: entry to ‘ZBUFFv04_decompressContinue’
zstd-1.5.7/lib/legacy/zstd_v04.c:3594:12: call_function: calling ‘ZBUFF_decompressContinue’ from ‘ZBUFFv04_decompressContinue’
# 2326| Dtime[n] = algoTime[Q][n].tableTime + (algoTime[Q][n].decode256Time * D256);
# 2327|
# 2328|-> Dtime[1] += Dtime[1] >> 4; Dtime[2] += Dtime[2] >> 3; /* advantage to algorithms using less memory, for cache eviction */
# 2329|
# 2330| if (Dtime[1] < Dtime[0]) algoNb = 1;
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v05.c:2111:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rankValOrigin’
zstd-1.5.7/lib/legacy/zstd_v05.c:3686:8: enter_function: entry to ‘ZSTDv05_decompressBegin_usingDict’
zstd-1.5.7/lib/legacy/zstd_v05.c:3692:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/legacy/zstd_v05.c:3693:21: branch_true: ...to here
zstd-1.5.7/lib/legacy/zstd_v05.c:3693:21: call_function: calling ‘ZSTDv05_decompress_insertDictionary’ from ‘ZSTDv05_decompressBegin_usingDict’
# 2109| U32 s;
# 2110|
# 2111|-> memcpy(rankVal, rankValOrigin, sizeof(rankVal));
# 2112|
# 2113| /* fill DTable */
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v05.c:2211:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
zstd-1.5.7/lib/legacy/zstd_v05.c:3686:8: enter_function: entry to ‘ZSTDv05_decompressBegin_usingDict’
zstd-1.5.7/lib/legacy/zstd_v05.c:3692:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/legacy/zstd_v05.c:3693:21: branch_true: ...to here
zstd-1.5.7/lib/legacy/zstd_v05.c:3693:21: call_function: calling ‘ZSTDv05_decompress_insertDictionary’ from ‘ZSTDv05_decompressBegin_usingDict’
# 2209| U32* rankValPtr = rankVal[consumed];
# 2210| for (w = 1; w <= maxW; w++) {
# 2211|-> rankValPtr[w] = rankVal0[w] >> consumed;
# 2212| } } }
# 2213|
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v07.c:2047:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rankValOrigin’
zstd-1.5.7/lib/legacy/zstd_v07.c:4114:8: enter_function: entry to ‘ZSTDv07_decompressBegin_usingDict’
zstd-1.5.7/lib/legacy/zstd_v07.c:4119:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/legacy/zstd_v07.c:4120:34: branch_true: ...to here
zstd-1.5.7/lib/legacy/zstd_v07.c:4120:34: call_function: calling ‘ZSTDv07_decompress_insertDictionary’ from ‘ZSTDv07_decompressBegin_usingDict’
# 2045| U32 s;
# 2046|
# 2047|-> memcpy(rankVal, rankValOrigin, sizeof(rankVal));
# 2048|
# 2049| /* fill DTable */
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/lib/legacy/zstd_v07.c:2145:37: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
zstd-1.5.7/lib/legacy/zstd_v07.c:4114:8: enter_function: entry to ‘ZSTDv07_decompressBegin_usingDict’
zstd-1.5.7/lib/legacy/zstd_v07.c:4119:8: branch_true: following ‘true’ branch...
zstd-1.5.7/lib/legacy/zstd_v07.c:4120:34: branch_true: ...to here
zstd-1.5.7/lib/legacy/zstd_v07.c:4120:34: call_function: calling ‘ZSTDv07_decompress_insertDictionary’ from ‘ZSTDv07_decompressBegin_usingDict’
# 2143| U32 w;
# 2144| for (w = 1; w < maxW+1; w++) {
# 2145|-> rankValPtr[w] = rankVal0[w] >> consumed;
# 2146| } } } }
# 2147|
Error: CPPCHECK_WARNING (CWE-457):
zstd-1.5.7/programs/benchfn.c:97: error[uninitvar]: Uninitialized variable: outcome.error_result_never_ever_use_directly
# 95| outcome.error_tag_never_ever_use_directly = 0;
# 96| outcome.internal_never_ever_use_directly = runTime;
# 97|-> return outcome;
# 98| }
# 99|
Error: GCC_ANALYZER_WARNING (CWE-457):
zstd-1.5.7/programs/benchfn.c:97:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘outcome.error_result_never_ever_use_directly’
zstd-1.5.7/programs/benchfn.c:144:20: call_function: inlined call to ‘BMK_setValid_runTime’ from ‘BMK_benchFunction’
# 95| outcome.error_tag_never_ever_use_directly = 0;
# 96| outcome.internal_never_ever_use_directly = runTime;
# 97|-> return outcome;
# 98| }
# 99|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchfn.c:195:30: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
zstd-1.5.7/programs/benchfn.c:160:21: enter_function: entry to ‘BMK_createTimedFnState’
zstd-1.5.7/programs/benchfn.c:162:56: acquire_memory: allocated here
zstd-1.5.7/programs/benchfn.c:163:8: branch_false: following ‘false’ branch (when ‘r’ is non-NULL)...
zstd-1.5.7/programs/benchfn.c:164:5: branch_false: ...to here
zstd-1.5.7/programs/benchfn.c:164:5: call_function: calling ‘BMK_resetTimedFnState’ from ‘BMK_createTimedFnState’
# 193| timedFnState->fastestRun.sumOfReturn = (size_t)(-1LL);
# 194| timedFnState->nbLoops = 1;
# 195|-> timedFnState->coolTime = UTIL_getTime();
# 196| }
# 197|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘compressedBuffer’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘resultBuffer’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 462| for (fileNb = 0; fileNb < nbFiles; fileNb++) {
# 463| U64 const fSize64 =
# 464|-> ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466| RETURN_ERROR(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘compressedBuffer’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘resultBuffer’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 464| ZSTD_findDecompressedSize(srcPtr, fileSizes[fileNb]);
# 465| if (fSize64 == ZSTD_CONTENTSIZE_UNKNOWN) {
# 466|-> RETURN_ERROR(
# 467| 32,
# 468| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘compressedBuffer’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘resultBuffer’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:472:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 470| }
# 471| if (fSize64 == ZSTD_CONTENTSIZE_ERROR) {
# 472|-> RETURN_ERROR(
# 473| 32,
# 474| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:492:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:994:5: enter_function: entry to ‘BMK_syntheticTest’
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1026:19: call_function: calling ‘BMK_benchCLevels’ from ‘BMK_syntheticTest’
# 490| *resultBufferPtr = malloc(decodedSize);
# 491| if (!(*resultBufferPtr)) {
# 492|-> RETURN_ERROR(
# 493| 33,
# 494| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:492:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:994:5: enter_function: entry to ‘BMK_syntheticTest’
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1026:19: call_function: calling ‘BMK_benchCLevels’ from ‘BMK_syntheticTest’
# 490| *resultBufferPtr = malloc(decodedSize);
# 491| if (!(*resultBufferPtr)) {
# 492|-> RETURN_ERROR(
# 493| 33,
# 494| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:492:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:994:5: enter_function: entry to ‘BMK_syntheticTest’
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1026:19: call_function: calling ‘BMK_benchCLevels’ from ‘BMK_syntheticTest’
# 490| *resultBufferPtr = malloc(decodedSize);
# 491| if (!(*resultBufferPtr)) {
# 492|-> RETURN_ERROR(
# 493| 33,
# 494| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:492:17: warning[-Wanalyzer-malloc-leak]: leak of ‘compressedBuffer’
zstd-1.5.7/programs/benchzstd.c:994:5: enter_function: entry to ‘BMK_syntheticTest’
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1026:19: call_function: calling ‘BMK_benchCLevels’ from ‘BMK_syntheticTest’
# 490| *resultBufferPtr = malloc(decodedSize);
# 491| if (!(*resultBufferPtr)) {
# 492|-> RETURN_ERROR(
# 493| 33,
# 494| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:492:17: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:994:5: enter_function: entry to ‘BMK_syntheticTest’
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1026:19: call_function: calling ‘BMK_benchCLevels’ from ‘BMK_syntheticTest’
# 490| *resultBufferPtr = malloc(decodedSize);
# 491| if (!(*resultBufferPtr)) {
# 492|-> RETURN_ERROR(
# 493| 33,
# 494| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:492:17: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:994:5: enter_function: entry to ‘BMK_syntheticTest’
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1026:19: call_function: calling ‘BMK_benchCLevels’ from ‘BMK_syntheticTest’
# 490| *resultBufferPtr = malloc(decodedSize);
# 491| if (!(*resultBufferPtr)) {
# 492|-> RETURN_ERROR(
# 493| 33,
# 494| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:492:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:994:5: enter_function: entry to ‘BMK_syntheticTest’
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1026:19: call_function: calling ‘BMK_benchCLevels’ from ‘BMK_syntheticTest’
# 490| *resultBufferPtr = malloc(decodedSize);
# 491| if (!(*resultBufferPtr)) {
# 492|-> RETURN_ERROR(
# 493| 33,
# 494| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:492:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:994:5: enter_function: entry to ‘BMK_syntheticTest’
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1026:19: call_function: calling ‘BMK_benchCLevels’ from ‘BMK_syntheticTest’
# 490| *resultBufferPtr = malloc(decodedSize);
# 491| if (!(*resultBufferPtr)) {
# 492|-> RETURN_ERROR(
# 493| 33,
# 494| BMK_benchOutcome_t,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:818:45: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 816| size_t* const resSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
# 817|
# 818|-> BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820| BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:818:45: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 816| size_t* const resSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
# 817|
# 818|-> BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820| BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:818:45: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 816| size_t* const resSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
# 817|
# 818|-> BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820| BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:818:45: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 816| size_t* const resSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
# 817|
# 818|-> BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820| BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:818:45: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 816| size_t* const resSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
# 817|
# 818|-> BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820| BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:818:45: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 816| size_t* const resSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
# 817|
# 818|-> BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820| BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:818:45: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 816| size_t* const resSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
# 817|
# 818|-> BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820| BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:820:47: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 818| BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820|-> BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:820:47: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 818| BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820|-> BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:820:47: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 818| BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820|-> BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:820:47: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 818| BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820|-> BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:820:47: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 818| BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820|-> BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:820:47: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 818| BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820|-> BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:820:47: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 818| BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(
# 819| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 820|-> BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:823:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
# 823|-> ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824| ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:823:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
# 823|-> ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824| ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:823:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
# 823|-> ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824| ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:823:29: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
# 823|-> ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824| ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:823:29: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
# 823|-> ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824| ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:823:29: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
# 823|-> ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824| ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:823:29: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 821| adv->nbSeconds * 1000, BMK_RUNTEST_DEFAULT_MS);
# 822|
# 823|-> ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824| ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:824:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 822|
# 823| ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824|-> ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
# 826| const size_t maxCompressedSize = dstCapacity
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:824:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 822|
# 823| ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824|-> ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
# 826| const size_t maxCompressedSize = dstCapacity
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:824:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 822|
# 823| ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824|-> ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
# 826| const size_t maxCompressedSize = dstCapacity
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:824:29: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 822|
# 823| ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824|-> ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
# 826| const size_t maxCompressedSize = dstCapacity
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:824:29: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 822|
# 823| ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824|-> ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
# 826| const size_t maxCompressedSize = dstCapacity
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:824:29: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 822|
# 823| ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824|-> ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
# 826| const size_t maxCompressedSize = dstCapacity
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:824:29: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 822|
# 823| ZSTD_CCtx* const cctx = ZSTD_createCCtx();
# 824|-> ZSTD_DCtx* const dctx = ZSTD_createDCtx();
# 825|
# 826| const size_t maxCompressedSize = dstCapacity
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:828:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cCapacities’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 826| const size_t maxCompressedSize = dstCapacity
# 827| ? dstCapacity
# 828|-> : ZSTD_compressBound(srcSize) + (maxNbBlocks * 1024);
# 829|
# 830| void* const internalDstBuffer =
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:828:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 826| const size_t maxCompressedSize = dstCapacity
# 827| ? dstCapacity
# 828|-> : ZSTD_compressBound(srcSize) + (maxNbBlocks * 1024);
# 829|
# 830| void* const internalDstBuffer =
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:828:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 826| const size_t maxCompressedSize = dstCapacity
# 827| ? dstCapacity
# 828|-> : ZSTD_compressBound(srcSize) + (maxNbBlocks * 1024);
# 829|
# 830| void* const internalDstBuffer =
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:828:15: warning[-Wanalyzer-malloc-leak]: leak of ‘resPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 826| const size_t maxCompressedSize = dstCapacity
# 827| ? dstCapacity
# 828|-> : ZSTD_compressBound(srcSize) + (maxNbBlocks * 1024);
# 829|
# 830| void* const internalDstBuffer =
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:828:15: warning[-Wanalyzer-malloc-leak]: leak of ‘resSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 826| const size_t maxCompressedSize = dstCapacity
# 827| ? dstCapacity
# 828|-> : ZSTD_compressBound(srcSize) + (maxNbBlocks * 1024);
# 829|
# 830| void* const internalDstBuffer =
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:828:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srcPtrs’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 826| const size_t maxCompressedSize = dstCapacity
# 827| ? dstCapacity
# 828|-> : ZSTD_compressBound(srcSize) + (maxNbBlocks * 1024);
# 829|
# 830| void* const internalDstBuffer =
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:828:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srcSizes’
zstd-1.5.7/programs/benchzstd.c:932:12: enter_function: entry to ‘BMK_benchCLevels’
zstd-1.5.7/programs/benchzstd.c:952:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:956:8: branch_false: following ‘false’ branch (when ‘endCLevel >= startCLevel’)...
zstd-1.5.7/programs/benchzstd.c:961:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:974:31: branch_true: following ‘true’ branch (when ‘level <= endCLevel’)...
zstd-1.5.7/programs/benchzstd.c:975:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:975:34: call_function: calling ‘BMK_benchMemAdvanced’ from ‘BMK_benchCLevels’
# 826| const size_t maxCompressedSize = dstCapacity
# 827| ? dstCapacity
# 828|-> : ZSTD_compressBound(srcSize) + (maxNbBlocks * 1024);
# 829|
# 830| void* const internalDstBuffer =
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1014:9: warning[-Wanalyzer-malloc-leak]: leak of ‘srcBuffer’
zstd-1.5.7/programs/benchzstd.c:1006:29: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_true: following ‘true’ branch (when ‘compressibility < 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1014:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1014:9: danger: ‘srcBuffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/106/codeFlows/0/threadFlows/0/locations/0)
# 1012| /* Fill input buffer */
# 1013| if (compressibility < 0.0) {
# 1014|-> LOREM_genBuffer(srcBuffer, benchedSize, 0);
# 1015| name = "Lorem ipsum";
# 1016| } else {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1017:9: warning[-Wanalyzer-malloc-leak]: leak of ‘srcBuffer’
zstd-1.5.7/programs/benchzstd.c:1006:29: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1007:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1013:8: branch_false: following ‘false’ branch (when ‘compressibility >= 0.0’)...
zstd-1.5.7/programs/benchzstd.c:1017:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1017:9: danger: ‘srcBuffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/107/codeFlows/0/threadFlows/0/locations/0)
# 1015| name = "Lorem ipsum";
# 1016| } else {
# 1017|-> RDG_genBuffer(srcBuffer, benchedSize, compressibility, 0.0, 0);
# 1018| formatString_u(
# 1019| nameBuff,
Error: GCC_ANALYZER_WARNING (CWE-126):
zstd-1.5.7/programs/benchzstd.c:1076:27: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1074| unsigned n;
# 1075| for (n = 0; n < nbFiles; n++) {
# 1076|-> const char* const filename = fileNamesTable[n];
# 1077| U64 fileSize = UTIL_getFileSize(
# 1078| filename); /* last file may be shortened */
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1077:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dictBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1182:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1075| for (n = 0; n < nbFiles; n++) {
# 1076| const char* const filename = fileNamesTable[n];
# 1077|-> U64 fileSize = UTIL_getFileSize(
# 1078| filename); /* last file may be shortened */
# 1079| if (UTIL_isDirectory(filename)) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1077:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1075| for (n = 0; n < nbFiles; n++) {
# 1076| const char* const filename = fileNamesTable[n];
# 1077|-> U64 fileSize = UTIL_getFileSize(
# 1078| filename); /* last file may be shortened */
# 1079| if (UTIL_isDirectory(filename)) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1077:24: warning[-Wanalyzer-malloc-leak]: leak of ‘srcBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1207:19: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:17: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1214:31: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:31: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1215:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1224:31: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1224:31: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1075| for (n = 0; n < nbFiles; n++) {
# 1076| const char* const filename = fileNamesTable[n];
# 1077|-> U64 fileSize = UTIL_getFileSize(
# 1078| filename); /* last file may be shortened */
# 1079| if (UTIL_isDirectory(filename)) {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1079:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dictBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1182:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1077| U64 fileSize = UTIL_getFileSize(
# 1078| filename); /* last file may be shortened */
# 1079|-> if (UTIL_isDirectory(filename)) {
# 1080| DISPLAYLEVEL(
# 1081| 2, "Ignoring %s directory... \n", filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1079:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1077| U64 fileSize = UTIL_getFileSize(
# 1078| filename); /* last file may be shortened */
# 1079|-> if (UTIL_isDirectory(filename)) {
# 1080| DISPLAYLEVEL(
# 1081| 2, "Ignoring %s directory... \n", filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1079:13: warning[-Wanalyzer-malloc-leak]: leak of ‘srcBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1207:19: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:17: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1214:31: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:31: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1215:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1224:31: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1224:31: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1077| U64 fileSize = UTIL_getFileSize(
# 1078| filename); /* last file may be shortened */
# 1079|-> if (UTIL_isDirectory(filename)) {
# 1080| DISPLAYLEVEL(
# 1081| 2, "Ignoring %s directory... \n", filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1080:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dictBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1182:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1078| filename); /* last file may be shortened */
# 1079| if (UTIL_isDirectory(filename)) {
# 1080|-> DISPLAYLEVEL(
# 1081| 2, "Ignoring %s directory... \n", filename);
# 1082| fileSizes[n] = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1080:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1078| filename); /* last file may be shortened */
# 1079| if (UTIL_isDirectory(filename)) {
# 1080|-> DISPLAYLEVEL(
# 1081| 2, "Ignoring %s directory... \n", filename);
# 1082| fileSizes[n] = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1080:13: warning[-Wanalyzer-malloc-leak]: leak of ‘srcBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1207:19: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:17: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1214:31: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:31: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1215:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1224:31: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1224:31: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1078| filename); /* last file may be shortened */
# 1079| if (UTIL_isDirectory(filename)) {
# 1080|-> DISPLAYLEVEL(
# 1081| 2, "Ignoring %s directory... \n", filename);
# 1082| fileSizes[n] = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1086:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dictBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1182:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1084| }
# 1085| if (fileSize == UTIL_FILESIZE_UNKNOWN) {
# 1086|-> DISPLAYLEVEL(
# 1087| 2,
# 1088| "Cannot evaluate size of %s, ignoring ... \n",
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1086:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1084| }
# 1085| if (fileSize == UTIL_FILESIZE_UNKNOWN) {
# 1086|-> DISPLAYLEVEL(
# 1087| 2,
# 1088| "Cannot evaluate size of %s, ignoring ... \n",
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1086:13: warning[-Wanalyzer-malloc-leak]: leak of ‘srcBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1207:19: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:17: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1214:31: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:31: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1215:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1224:31: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1224:31: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1084| }
# 1085| if (fileSize == UTIL_FILESIZE_UNKNOWN) {
# 1086|-> DISPLAYLEVEL(
# 1087| 2,
# 1088| "Cannot evaluate size of %s, ignoring ... \n",
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1101:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dictBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1182:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1099| { FILE* const f = fopen(filename, "rb");
# 1100| if (f == NULL) {
# 1101|-> RETURN_ERROR_INT(
# 1102| 10, "cannot open file %s", filename);
# 1103| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1101:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1099| { FILE* const f = fopen(filename, "rb");
# 1100| if (f == NULL) {
# 1101|-> RETURN_ERROR_INT(
# 1102| 10, "cannot open file %s", filename);
# 1103| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1101:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srcBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1207:19: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:17: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1214:31: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:31: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1215:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1224:31: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1224:31: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1099| { FILE* const f = fopen(filename, "rb");
# 1100| if (f == NULL) {
# 1101|-> RETURN_ERROR_INT(
# 1102| 10, "cannot open file %s", filename);
# 1103| }
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/benchzstd.c:1104:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
zstd-1.5.7/programs/benchzstd.c:1075:17: branch_true: following ‘true’ branch (when ‘nbFiles > n’)...
zstd-1.5.7/programs/benchzstd.c:1076:52: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1079:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1085:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1085:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1093:24: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1099:29: acquire_resource: opened here
zstd-1.5.7/programs/benchzstd.c:1100:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1104:13: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1104:13: branch_true: following ‘true’ branch (when ‘displayLevel > 1’)...
zstd-1.5.7/programs/benchzstd.c:1104:13: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1104:13: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(7)](sarif:/runs/0/results/131/codeFlows/0/threadFlows/0/locations/6)
# 1102| 10, "cannot open file %s", filename);
# 1103| }
# 1104|-> OUTPUTLEVEL(2, "Loading %s... \r", filename);
# 1105| { size_t const readSize =
# 1106| fread(((char*)buffer) + pos, 1, (size_t)fileSize, f);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1104:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dictBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1182:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1102| 10, "cannot open file %s", filename);
# 1103| }
# 1104|-> OUTPUTLEVEL(2, "Loading %s... \r", filename);
# 1105| { size_t const readSize =
# 1106| fread(((char*)buffer) + pos, 1, (size_t)fileSize, f);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1104:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1176:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1182:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1183:12: branch_false: following ‘false’ branch (when ‘dictBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1193:35: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1193:35: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1102| 10, "cannot open file %s", filename);
# 1103| }
# 1104|-> OUTPUTLEVEL(2, "Loading %s... \r", filename);
# 1105| { size_t const readSize =
# 1106| fread(((char*)buffer) + pos, 1, (size_t)fileSize, f);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1104:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
zstd-1.5.7/programs/benchzstd.c:1075:17: branch_true: following ‘true’ branch (when ‘nbFiles > n’)...
zstd-1.5.7/programs/benchzstd.c:1076:52: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1079:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1085:12: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1085:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1093:24: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1099:29: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1100:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1104:13: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1104:13: branch_true: following ‘true’ branch (when ‘displayLevel > 1’)...
zstd-1.5.7/programs/benchzstd.c:1104:13: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1104:13: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/133/codeFlows/0/threadFlows/0/locations/6)
# 1102| 10, "cannot open file %s", filename);
# 1103| }
# 1104|-> OUTPUTLEVEL(2, "Loading %s... \r", filename);
# 1105| { size_t const readSize =
# 1106| fread(((char*)buffer) + pos, 1, (size_t)fileSize, f);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1104:13: warning[-Wanalyzer-malloc-leak]: leak of ‘srcBuffer’
zstd-1.5.7/programs/benchzstd.c:1125:5: enter_function: entry to ‘BMK_benchFilesAdvanced’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1207:19: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:17: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1214:31: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1214:31: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1215:8: branch_false: following ‘false’ branch (when ‘srcBuffer’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1224:31: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1224:31: call_function: calling ‘BMK_loadFiles’ from ‘BMK_benchFilesAdvanced’
# 1102| 10, "cannot open file %s", filename);
# 1103| }
# 1104|-> OUTPUTLEVEL(2, "Loading %s... \r", filename);
# 1105| { size_t const readSize =
# 1106| fread(((char*)buffer) + pos, 1, (size_t)fileSize, f);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1165:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1165:34: danger: ‘fileSizes’ leaks here; was allocated at [(7)](sarif:/runs/0/results/136/codeFlows/0/threadFlows/0/locations/6)
# 1163| /* Load dictionary */
# 1164| if (dictFileName != NULL) {
# 1165|-> U64 const dictFileSize = UTIL_getFileSize(dictFileName);
# 1166| if (dictFileSize == UTIL_FILESIZE_UNKNOWN) {
# 1167| DISPLAYLEVEL(
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1167:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1165:34: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1166:12: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1167:13: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1167:13: branch_true: following ‘true’ branch (when ‘displayLevel > 0’)...
zstd-1.5.7/programs/benchzstd.c:1167:13: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1167:13: danger: ‘fileSizes’ leaks here; was allocated at [(7)](sarif:/runs/0/results/137/codeFlows/0/threadFlows/0/locations/6)
# 1165| U64 const dictFileSize = UTIL_getFileSize(dictFileName);
# 1166| if (dictFileSize == UTIL_FILESIZE_UNKNOWN) {
# 1167|-> DISPLAYLEVEL(
# 1168| 1,
# 1169| "error loading %s : %s \n",
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/benchzstd.c:1211:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fileSizes’
zstd-1.5.7/programs/benchzstd.c:1142:8: branch_false: following ‘false’ branch (when ‘nbFiles != 0’)...
zstd-1.5.7/programs/benchzstd.c:1147:21: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1147:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1152:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1157:26: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1157:26: acquire_memory: allocated here
zstd-1.5.7/programs/benchzstd.c:1158:8: branch_false: following ‘false’ branch (when ‘fileSizes’ is non-NULL)...
zstd-1.5.7/programs/benchzstd.c:1164:9: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1164:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/benchzstd.c:1207:19: branch_false: ...to here
zstd-1.5.7/programs/benchzstd.c:1210:8: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/benchzstd.c:1211:9: branch_true: ...to here
zstd-1.5.7/programs/benchzstd.c:1211:9: danger: ‘fileSizes’ leaks here; was allocated at [(7)](sarif:/runs/0/results/138/codeFlows/0/threadFlows/0/locations/6)
# 1209| benchedSize = (size_t)totalSizeToLoad;
# 1210| if (benchedSize < totalSizeToLoad)
# 1211|-> DISPLAY("Not enough memory; testing %u MB only...\n",
# 1212| (unsigned)(benchedSize >> 20));
# 1213|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/dibio.c:98:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dictBuffer’
zstd-1.5.7/programs/dibio.c:312:5: enter_function: entry to ‘DiB_trainFromFiles’
zstd-1.5.7/programs/dibio.c:322:30: acquire_memory: allocated here
zstd-1.5.7/programs/dibio.c:336:10: call_function: calling ‘DiB_fileStats’ from ‘DiB_trainFromFiles’
# 96| static S64 DiB_getFileSize (const char * fileName)
# 97| {
# 98|-> U64 const fileSize = UTIL_getFileSize(fileName);
# 99| return (fileSize == UTIL_FILESIZE_UNKNOWN) ? -1 : (S64)fileSize;
# 100| }
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/dibio.c:140:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "rb")’
zstd-1.5.7/programs/dibio.c:128:13: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/dibio.c:130:60: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:131:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:137:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:137:13: acquire_resource: opened here
zstd-1.5.7/programs/dibio.c:138:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:140:9: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:140:9: branch_true: following ‘true’ branch (when ‘displayLevel > 1’)...
zstd-1.5.7/programs/dibio.c:140:9: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:140:9: danger: ‘fopen(*<unknown>, "rb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 138| if (f == NULL)
# 139| EXM_THROW(10, "zstd: dictBuilder: %s %s ", fileNamesTable[fileIndex], strerror(errno));
# 140|-> DISPLAYUPDATE(2, "Loading %s... \r", fileNamesTable[fileIndex]);
# 141|
# 142| /* Load the first chunk of data from the file */
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/dibio.c:140:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "rb")’
zstd-1.5.7/programs/dibio.c:128:13: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/dibio.c:130:60: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:131:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:137:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:137:13: acquire_memory: allocated here
zstd-1.5.7/programs/dibio.c:138:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:140:9: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:140:9: branch_true: following ‘true’ branch (when ‘displayLevel > 1’)...
zstd-1.5.7/programs/dibio.c:140:9: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:140:9: danger: ‘fopen(*<unknown>, "rb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 138| if (f == NULL)
# 139| EXM_THROW(10, "zstd: dictBuilder: %s %s ", fileNamesTable[fileIndex], strerror(errno));
# 140|-> DISPLAYUPDATE(2, "Loading %s... \r", fileNamesTable[fileIndex]);
# 141|
# 142| /* Load the first chunk of data from the file */
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/dibio.c:144:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "rb")’
zstd-1.5.7/programs/dibio.c:128:13: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/dibio.c:130:60: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:131:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:137:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:137:13: acquire_resource: opened here
zstd-1.5.7/programs/dibio.c:138:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:140:9: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:143:26: branch_true: following ‘true’ branch (when ‘targetChunkSize != 0’)...
zstd-1.5.7/programs/dibio.c:144:37: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:146:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:148:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:144:37: danger: ‘fopen(*<unknown>, "rb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
# 142| /* Load the first chunk of data from the file */
# 143| fileDataLoaded = targetChunkSize > 0 ?
# 144|-> (size_t)MIN(fileSize, (S64)targetChunkSize) :
# 145| (size_t)MIN(fileSize, SAMPLESIZE_MAX );
# 146| if (totalDataLoaded + fileDataLoaded > *bufferSizePtr)
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/dibio.c:144:37: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "rb")’
zstd-1.5.7/programs/dibio.c:128:13: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/dibio.c:130:60: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:131:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:137:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:137:13: acquire_memory: allocated here
zstd-1.5.7/programs/dibio.c:138:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:140:9: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:143:26: branch_true: following ‘true’ branch (when ‘targetChunkSize != 0’)...
zstd-1.5.7/programs/dibio.c:144:37: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:146:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:148:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:144:37: danger: ‘fopen(*<unknown>, "rb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
# 142| /* Load the first chunk of data from the file */
# 143| fileDataLoaded = targetChunkSize > 0 ?
# 144|-> (size_t)MIN(fileSize, (S64)targetChunkSize) :
# 145| (size_t)MIN(fileSize, SAMPLESIZE_MAX );
# 146| if (totalDataLoaded + fileDataLoaded > *bufferSizePtr)
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/dibio.c:146:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "rb")’
zstd-1.5.7/programs/dibio.c:128:13: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/dibio.c:130:60: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:131:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:137:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:137:13: acquire_resource: opened here
zstd-1.5.7/programs/dibio.c:138:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:140:9: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:143:26: branch_false: following ‘false’ branch (when ‘targetChunkSize == 0’)...
zstd-1.5.7/programs/dibio.c:143:26: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:146:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:148:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:146:13: danger: ‘fopen(*<unknown>, "rb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
# 144| (size_t)MIN(fileSize, (S64)targetChunkSize) :
# 145| (size_t)MIN(fileSize, SAMPLESIZE_MAX );
# 146|-> if (totalDataLoaded + fileDataLoaded > *bufferSizePtr)
# 147| break;
# 148| if (fread( buff+totalDataLoaded, 1, fileDataLoaded, f ) != fileDataLoaded)
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/dibio.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "rb")’
zstd-1.5.7/programs/dibio.c:128:13: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/dibio.c:130:60: branch_true: ...to here
zstd-1.5.7/programs/dibio.c:131:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:137:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:137:13: acquire_memory: allocated here
zstd-1.5.7/programs/dibio.c:138:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:140:9: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:143:26: branch_false: following ‘false’ branch (when ‘targetChunkSize == 0’)...
zstd-1.5.7/programs/dibio.c:143:26: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:146:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:148:13: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:146:13: danger: ‘fopen(*<unknown>, "rb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
# 144| (size_t)MIN(fileSize, (S64)targetChunkSize) :
# 145| (size_t)MIN(fileSize, SAMPLESIZE_MAX );
# 146|-> if (totalDataLoaded + fileDataLoaded > *bufferSizePtr)
# 147| break;
# 148| if (fread( buff+totalDataLoaded, 1, fileDataLoaded, f ) != fileDataLoaded)
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/dibio.c:254:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dictFileName, "wb")’
zstd-1.5.7/programs/dibio.c:250:21: acquire_resource: opened here
zstd-1.5.7/programs/dibio.c:251:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:253:24: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:254:10: danger: ‘fopen(dictFileName, "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 252|
# 253| { size_t const n = fwrite(buff, 1, buffSize, f);
# 254|-> if (n!=buffSize) EXM_THROW(4, "%s : write error", dictFileName) }
# 255|
# 256| { size_t const n = (size_t)fclose(f);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/dibio.c:254:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dictFileName, "wb")’
zstd-1.5.7/programs/dibio.c:250:21: acquire_memory: allocated here
zstd-1.5.7/programs/dibio.c:251:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/dibio.c:253:24: branch_false: ...to here
zstd-1.5.7/programs/dibio.c:254:10: danger: ‘fopen(dictFileName, "wb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 252|
# 253| { size_t const n = fwrite(buff, 1, buffSize, f);
# 254|-> if (n!=buffSize) EXM_THROW(4, "%s : write error", dictFileName) }
# 255|
# 256| { size_t const n = (size_t)fclose(f);
Error: GCC_ANALYZER_WARNING (CWE-479):
zstd-1.5.7/programs/fileio.c:143:5: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
zstd-1.5.7/programs/fileio.c:145:13: enter_function: entry to ‘addHandler’
zstd-1.5.7/programs/fileio.c:132:13: enter_function: entry to ‘INThandler’
zstd-1.5.7/programs/fileio.c:143:5: danger: call to ‘exit’ from within signal handler
# 141| }
# 142| DISPLAY("\n");
# 143|-> exit(2);
# 144| }
# 145| static void addHandler(char const* dstFileName)
Error: GCC_ANALYZER_WARNING (CWE-479):
zstd-1.5.7/programs/fileio.c:207:5: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘fprintf’ from within signal handler
zstd-1.5.7/programs/fileio.c:227:6: enter_function: entry to ‘FIO_addAbortHandler’
zstd-1.5.7/programs/fileio.c:192:13: enter_function: entry to ‘ABRThandler’
zstd-1.5.7/programs/fileio.c:207:5: danger: call to ‘fprintf’ from within signal handler
# 205| }
# 206|
# 207|-> DISPLAY("Caught %s signal, printing stack:\n", name);
# 208| /* Retrieve current stack addresses. */
# 209| addrlen = backtrace(addrlist, MAX_STACK_FRAMES);
Error: GCC_ANALYZER_WARNING (CWE-479):
zstd-1.5.7/programs/fileio.c:218:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘fprintf’ from within signal handler
zstd-1.5.7/programs/fileio.c:227:6: enter_function: entry to ‘FIO_addAbortHandler’
zstd-1.5.7/programs/fileio.c:192:13: enter_function: entry to ‘ABRThandler’
zstd-1.5.7/programs/fileio.c:210:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:215:18: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:217:43: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:218:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:218:9: danger: call to ‘fprintf’ from within signal handler
# 216| /* Print the stack trace, excluding calls handling the signal. */
# 217| for (i = ZSTD_START_SYMBOLLIST_FRAME; i < addrlen; i++) {
# 218|-> DISPLAY("%s\n", symbollist[i]);
# 219| }
# 220| free(symbollist);
Error: GCC_ANALYZER_WARNING (CWE-479):
zstd-1.5.7/programs/fileio.c:220:5: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘free’ from within signal handler
zstd-1.5.7/programs/fileio.c:227:6: enter_function: entry to ‘FIO_addAbortHandler’
zstd-1.5.7/programs/fileio.c:192:13: enter_function: entry to ‘ABRThandler’
zstd-1.5.7/programs/fileio.c:210:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:215:18: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:220:5: danger: call to ‘free’ from within signal handler
# 218| DISPLAY("%s\n", symbollist[i]);
# 219| }
# 220|-> free(symbollist);
# 221| /* Reset and raise the signal so default handler runs. */
# 222| signal(sig, SIG_DFL);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:309:20: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
zstd-1.5.7/programs/fileio.c:280:44: acquire_memory: allocated here
zstd-1.5.7/programs/fileio.c:281:8: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
zstd-1.5.7/programs/fileio.c:283:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:309:20: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 307| ret->excludeCompressedFiles = 0;
# 308| ret->allowBlockDevices = 0;
# 309|-> ret->asyncIO = AIO_supported();
# 310| ret->passThrough = -1;
# 311| return ret;
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:722:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fileName, "rb")’
zstd-1.5.7/programs/fileio.c:712:8: branch_false: following ‘false’ branch (when ‘fileName’ is non-NULL)...
zstd-1.5.7/programs/fileio.c:714:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:716:18: acquire_resource: opened here
zstd-1.5.7/programs/fileio.c:718:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:722:16: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:722:16: danger: ‘fopen(fileName, "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 720| }
# 721|
# 722|-> fileSize = UTIL_getFileSizeStat(dictFileStat);
# 723| {
# 724| size_t const dictSizeMax = prefs->patchFromMode ? prefs->memLimit : DICTSIZE_MAX;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:722:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fileName, "rb")’
zstd-1.5.7/programs/fileio.c:712:8: branch_false: following ‘false’ branch (when ‘fileName’ is non-NULL)...
zstd-1.5.7/programs/fileio.c:714:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:716:18: acquire_memory: allocated here
zstd-1.5.7/programs/fileio.c:718:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:722:16: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:722:16: danger: ‘fopen(fileName, "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 720| }
# 721|
# 722|-> fileSize = UTIL_getFileSizeStat(dictFileStat);
# 723| {
# 724| size_t const dictSizeMax = prefs->patchFromMode ? prefs->memLimit : DICTSIZE_MAX;
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:724:36: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fileName, "rb")’
zstd-1.5.7/programs/fileio.c:712:8: branch_false: following ‘false’ branch (when ‘fileName’ is non-NULL)...
zstd-1.5.7/programs/fileio.c:714:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:716:18: acquire_resource: opened here
zstd-1.5.7/programs/fileio.c:718:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:722:16: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:724:36: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:725:12: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:724:36: danger: ‘fopen(fileName, "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 722| fileSize = UTIL_getFileSizeStat(dictFileStat);
# 723| {
# 724|-> size_t const dictSizeMax = prefs->patchFromMode ? prefs->memLimit : DICTSIZE_MAX;
# 725| if (fileSize > dictSizeMax) {
# 726| EXM_THROW(34, "Dictionary file %s is too large (> %u bytes)",
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:724:36: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fileName, "rb")’
zstd-1.5.7/programs/fileio.c:712:8: branch_false: following ‘false’ branch (when ‘fileName’ is non-NULL)...
zstd-1.5.7/programs/fileio.c:714:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:716:18: acquire_memory: allocated here
zstd-1.5.7/programs/fileio.c:718:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:722:16: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:724:36: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:725:12: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:724:36: danger: ‘fopen(fileName, "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 722| fileSize = UTIL_getFileSizeStat(dictFileStat);
# 723| {
# 724|-> size_t const dictSizeMax = prefs->patchFromMode ? prefs->memLimit : DICTSIZE_MAX;
# 725| if (fileSize > dictSizeMax) {
# 726| EXM_THROW(34, "Dictionary file %s is too large (> %u bytes)",
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:769:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fileName, 0)’
zstd-1.5.7/programs/fileio.c:759:8: branch_false: following ‘false’ branch (when ‘fileName’ is non-NULL)...
zstd-1.5.7/programs/fileio.c:761:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:763:18: acquire_resource: opened here
zstd-1.5.7/programs/fileio.c:765:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:769:16: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:769:16: danger: ‘open(fileName, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
# 767| }
# 768|
# 769|-> fileSize = UTIL_getFileSizeStat(dictFileStat);
# 770| {
# 771| size_t const dictSizeMax = prefs->patchFromMode ? prefs->memLimit : DICTSIZE_MAX;
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:771:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fileName, 0)’
zstd-1.5.7/programs/fileio.c:759:8: branch_false: following ‘false’ branch (when ‘fileName’ is non-NULL)...
zstd-1.5.7/programs/fileio.c:761:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:763:18: acquire_resource: opened here
zstd-1.5.7/programs/fileio.c:765:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:769:16: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:771:36: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:772:12: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:771:36: danger: ‘open(fileName, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 769| fileSize = UTIL_getFileSizeStat(dictFileStat);
# 770| {
# 771|-> size_t const dictSizeMax = prefs->patchFromMode ? prefs->memLimit : DICTSIZE_MAX;
# 772| if (fileSize > dictSizeMax) {
# 773| EXM_THROW(34, "Dictionary file %s is too large (> %u bytes)",
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:890:5: warning[-Wanalyzer-malloc-leak]: leak of ‘filenameTableSorted’
zstd-1.5.7/programs/fileio.c:875:42: acquire_memory: allocated here
zstd-1.5.7/programs/fileio.c:876:8: branch_false: following ‘false’ branch (when ‘filenameTableSorted’ is non-NULL)...
<unknown>: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:890:5: danger: ‘filenameTableSorted’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 888| }
# 889|
# 890|-> qsort((void*)filenameTableSorted, nbFiles, sizeof(char*), UTIL_compareStr);
# 891| prevElem = filenameTableSorted[0];
# 892| for (u = 1; u < nbFiles; ++u) {
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2066:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2065:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2066:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2066:20: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/9)
# 2064| /* Don't use AsyncIO for small files */
# 2065| if (strcmp(srcFileName, stdinmark)) /* Stdin doesn't have stats */
# 2066|-> fileSize = UTIL_getFileSizeStat(&srcFileStat);
# 2067| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2068| AIO_ReadPool_setAsync(ress.readCtx, 0);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2066:20: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2065:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2066:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2066:20: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/9)
# 2064| /* Don't use AsyncIO for small files */
# 2065| if (strcmp(srcFileName, stdinmark)) /* Stdin doesn't have stats */
# 2066|-> fileSize = UTIL_getFileSizeStat(&srcFileStat);
# 2067| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2068| AIO_ReadPool_setAsync(ress.readCtx, 0);
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2068:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2065:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2066:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2067:7: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2068:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2068:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/9)
# 2066| fileSize = UTIL_getFileSizeStat(&srcFileStat);
# 2067| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2068|-> AIO_ReadPool_setAsync(ress.readCtx, 0);
# 2069| AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2070| } else {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2068:9: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2065:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2066:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2067:7: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2068:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2068:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/9)
# 2066| fileSize = UTIL_getFileSizeStat(&srcFileStat);
# 2067| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2068|-> AIO_ReadPool_setAsync(ress.readCtx, 0);
# 2069| AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2070| } else {
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2069:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2065:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2066:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2067:7: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2068:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2069:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/9)
# 2067| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2068| AIO_ReadPool_setAsync(ress.readCtx, 0);
# 2069|-> AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2070| } else {
# 2071| AIO_ReadPool_setAsync(ress.readCtx, 1);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2069:9: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2065:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2066:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2067:7: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2068:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2069:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/9)
# 2067| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2068| AIO_ReadPool_setAsync(ress.readCtx, 0);
# 2069|-> AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2070| } else {
# 2071| AIO_ReadPool_setAsync(ress.readCtx, 1);
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2071:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2071:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/9)
# 2069| AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2070| } else {
# 2071|-> AIO_ReadPool_setAsync(ress.readCtx, 1);
# 2072| AIO_WritePool_setAsync(ress.writeCtx, 1);
# 2073| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2071:9: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2071:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/9)
# 2069| AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2070| } else {
# 2071|-> AIO_ReadPool_setAsync(ress.readCtx, 1);
# 2072| AIO_WritePool_setAsync(ress.writeCtx, 1);
# 2073| }
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2072:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2072:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/9)
# 2070| } else {
# 2071| AIO_ReadPool_setAsync(ress.readCtx, 1);
# 2072|-> AIO_WritePool_setAsync(ress.writeCtx, 1);
# 2073| }
# 2074|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2072:9: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2072:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/9)
# 2070| } else {
# 2071| AIO_ReadPool_setAsync(ress.readCtx, 1);
# 2072|-> AIO_WritePool_setAsync(ress.writeCtx, 1);
# 2073| }
# 2074|
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2076:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2076:14: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/9)
# 2074|
# 2075| AIO_ReadPool_setFile(ress.readCtx, srcFile);
# 2076|-> result = FIO_compressFilename_dstFile(
# 2077| fCtx, prefs, ress,
# 2078| dstFileName, srcFileName,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2076:14: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2021:1: enter_function: entry to ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_compressFilename_srcFile’
zstd-1.5.7/programs/fileio.c:2061:15: return_function: returning to ‘FIO_compressFilename_srcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2062:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2065:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2076:14: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/9)
# 2074|
# 2075| AIO_ReadPool_setFile(ress.readCtx, srcFile);
# 2076|-> result = FIO_compressFilename_dstFile(
# 2077| fCtx, prefs, ress,
# 2078| dstFileName, srcFileName,
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2351:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ress.dict.dictBuffer’
zstd-1.5.7/programs/fileio.c:2322:16: enter_function: entry to ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2341:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2348:48: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2349:9: call_function: calling ‘FIO_initDict’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2349:9: return_function: returning to ‘FIO_createDResources’ from ‘FIO_initDict’
zstd-1.5.7/programs/fileio.c:2351:9: danger: ‘ress.dict.dictBuffer’ leaks here; was allocated at [(29)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/28)
# 2349| FIO_initDict(&ress.dict, dictFileName, prefs, &statbuf, dictBufferType);
# 2350|
# 2351|-> CHECK(ZSTD_DCtx_reset(ress.dctx, ZSTD_reset_session_only) );
# 2352|
# 2353| if (prefs->patchFromMode){
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2354:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ress.dict.dictBuffer’
zstd-1.5.7/programs/fileio.c:2322:16: enter_function: entry to ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2341:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2348:48: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2349:9: call_function: calling ‘FIO_initDict’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2349:9: return_function: returning to ‘FIO_createDResources’ from ‘FIO_initDict’
zstd-1.5.7/programs/fileio.c:2351:9: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2353:13: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2353:12: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2354:13: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2354:13: danger: ‘ress.dict.dictBuffer’ leaks here; was allocated at [(29)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/28)
# 2352|
# 2353| if (prefs->patchFromMode){
# 2354|-> CHECK(ZSTD_DCtx_refPrefix(ress.dctx, ress.dict.dictBuffer, ress.dict.dictBufferSize));
# 2355| } else {
# 2356| CHECK(ZSTD_DCtx_loadDictionary_byReference(ress.dctx, ress.dict.dictBuffer, ress.dict.dictBufferSize));
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2356:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ress.dict.dictBuffer’
zstd-1.5.7/programs/fileio.c:2322:16: enter_function: entry to ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2341:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2348:48: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2349:9: call_function: calling ‘FIO_initDict’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2349:9: return_function: returning to ‘FIO_createDResources’ from ‘FIO_initDict’
zstd-1.5.7/programs/fileio.c:2351:9: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2353:13: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2353:12: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2356:13: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2356:13: danger: ‘ress.dict.dictBuffer’ leaks here; was allocated at [(29)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/28)
# 2354| CHECK(ZSTD_DCtx_refPrefix(ress.dctx, ress.dict.dictBuffer, ress.dict.dictBufferSize));
# 2355| } else {
# 2356|-> CHECK(ZSTD_DCtx_loadDictionary_byReference(ress.dctx, ress.dict.dictBuffer, ress.dict.dictBufferSize));
# 2357| }
# 2358| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2360:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ress.dict.dictBuffer’
zstd-1.5.7/programs/fileio.c:2322:16: enter_function: entry to ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2341:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2348:48: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2349:9: call_function: calling ‘FIO_initDict’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2349:9: return_function: returning to ‘FIO_createDResources’ from ‘FIO_initDict’
zstd-1.5.7/programs/fileio.c:2351:9: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2353:13: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2354:13: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2360:21: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2360:21: danger: ‘ress.dict.dictBuffer’ leaks here; was allocated at [(29)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/28)
# 2358| }
# 2359|
# 2360|-> ress.writeCtx = AIO_WritePool_create(prefs, ZSTD_DStreamOutSize());
# 2361| ress.readCtx = AIO_ReadPool_create(prefs, ZSTD_DStreamInSize());
# 2362| return ress;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2361:20: warning[-Wanalyzer-malloc-leak]: leak of ‘ress.dict.dictBuffer’
zstd-1.5.7/programs/fileio.c:2322:16: enter_function: entry to ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2331:5: call_function: inlined call to ‘FIO_getDictFileStat’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2341:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2343:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2344:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2348:48: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2349:9: call_function: calling ‘FIO_initDict’ from ‘FIO_createDResources’
zstd-1.5.7/programs/fileio.c:2349:9: return_function: returning to ‘FIO_createDResources’ from ‘FIO_initDict’
zstd-1.5.7/programs/fileio.c:2351:9: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2353:13: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2354:13: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2360:21: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2361:20: danger: ‘ress.dict.dictBuffer’ leaks here; was allocated at [(29)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/28)
# 2359|
# 2360| ress.writeCtx = AIO_WritePool_create(prefs, ZSTD_DStreamOutSize());
# 2361|-> ress.readCtx = AIO_ReadPool_create(prefs, ZSTD_DStreamInSize());
# 2362| return ress;
# 2363| }
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2902:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2901:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2902:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2902:20: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/9)
# 2900| /* Don't use AsyncIO for small files */
# 2901| if (strcmp(srcFileName, stdinmark)) /* Stdin doesn't have stats */
# 2902|-> fileSize = UTIL_getFileSizeStat(&srcFileStat);
# 2903| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2904| AIO_ReadPool_setAsync(ress.readCtx, 0);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2902:20: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2901:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2902:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2902:20: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/9)
# 2900| /* Don't use AsyncIO for small files */
# 2901| if (strcmp(srcFileName, stdinmark)) /* Stdin doesn't have stats */
# 2902|-> fileSize = UTIL_getFileSizeStat(&srcFileStat);
# 2903| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2904| AIO_ReadPool_setAsync(ress.readCtx, 0);
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2904:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2901:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2902:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2903:7: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2904:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2904:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/9)
# 2902| fileSize = UTIL_getFileSizeStat(&srcFileStat);
# 2903| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2904|-> AIO_ReadPool_setAsync(ress.readCtx, 0);
# 2905| AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2906| } else {
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2904:9: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2901:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2902:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2903:7: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2904:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2904:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/9)
# 2902| fileSize = UTIL_getFileSizeStat(&srcFileStat);
# 2903| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2904|-> AIO_ReadPool_setAsync(ress.readCtx, 0);
# 2905| AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2906| } else {
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2905:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2901:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2902:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2903:7: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2904:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2905:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/9)
# 2903| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2904| AIO_ReadPool_setAsync(ress.readCtx, 0);
# 2905|-> AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2906| } else {
# 2907| AIO_ReadPool_setAsync(ress.readCtx, 1);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2905:9: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2901:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
zstd-1.5.7/programs/fileio.c:2902:20: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2903:7: branch_true: following ‘true’ branch...
zstd-1.5.7/programs/fileio.c:2904:9: branch_true: ...to here
zstd-1.5.7/programs/fileio.c:2905:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/9)
# 2903| if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
# 2904| AIO_ReadPool_setAsync(ress.readCtx, 0);
# 2905|-> AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2906| } else {
# 2907| AIO_ReadPool_setAsync(ress.readCtx, 1);
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2907:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2907:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/9)
# 2905| AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2906| } else {
# 2907|-> AIO_ReadPool_setAsync(ress.readCtx, 1);
# 2908| AIO_WritePool_setAsync(ress.writeCtx, 1);
# 2909| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2907:9: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2907:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/9)
# 2905| AIO_WritePool_setAsync(ress.writeCtx, 0);
# 2906| } else {
# 2907|-> AIO_ReadPool_setAsync(ress.readCtx, 1);
# 2908| AIO_WritePool_setAsync(ress.writeCtx, 1);
# 2909| }
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2908:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2908:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/9)
# 2906| } else {
# 2907| AIO_ReadPool_setAsync(ress.readCtx, 1);
# 2908|-> AIO_WritePool_setAsync(ress.writeCtx, 1);
# 2909| }
# 2910|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2908:9: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2908:9: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/9)
# 2906| } else {
# 2907| AIO_ReadPool_setAsync(ress.readCtx, 1);
# 2908|-> AIO_WritePool_setAsync(ress.writeCtx, 1);
# 2909| }
# 2910|
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:2911:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2911:5: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/9)
# 2909| }
# 2910|
# 2911|-> AIO_ReadPool_setFile(ress.readCtx, srcFile);
# 2912|
# 2913| result = FIO_decompressDstFile(fCtx, prefs, ress, dstFileName, srcFileName, &srcFileStat);
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:2911:5: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:2885:12: enter_function: entry to ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2892:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2897:15: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2897:15: call_function: calling ‘FIO_openSrcFile’ from ‘FIO_decompressSrcFile’
zstd-1.5.7/programs/fileio.c:2897:15: return_function: returning to ‘FIO_decompressSrcFile’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:2898:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:2901:9: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:2911:5: danger: ‘FIO_openSrcFile(prefs, srcFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/9)
# 2909| }
# 2910|
# 2911|-> AIO_ReadPool_setFile(ress.readCtx, srcFile);
# 2912|
# 2913| result = FIO_decompressDstFile(fCtx, prefs, ress, dstFileName, srcFileName, &srcFileStat);
Error: GCC_ANALYZER_WARNING (CWE-775):
zstd-1.5.7/programs/fileio.c:3284:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘FIO_openSrcFile(0, inFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:3277:1: enter_function: entry to ‘getFileInfo_fileConfirmed’
zstd-1.5.7/programs/fileio.c:3281:27: call_function: calling ‘FIO_openSrcFile’ from ‘getFileInfo_fileConfirmed’
zstd-1.5.7/programs/fileio.c:3281:27: return_function: returning to ‘getFileInfo_fileConfirmed’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:3282:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:3284:28: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:3284:28: danger: ‘FIO_openSrcFile(0, inFileName, & srcFileStat)’ leaks here; was opened at [(10)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/9)
# 3282| ERROR_IF(srcFile == NULL, info_file_error, "Error: could not open source file %s", inFileName);
# 3283|
# 3284|-> info->compressedSize = UTIL_getFileSizeStat(&srcFileStat);
# 3285| status = FIO_analyzeFrames(info, srcFile);
# 3286|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio.c:3284:28: warning[-Wanalyzer-malloc-leak]: leak of ‘FIO_openSrcFile(0, inFileName, & srcFileStat)’
zstd-1.5.7/programs/fileio.c:3277:1: enter_function: entry to ‘getFileInfo_fileConfirmed’
zstd-1.5.7/programs/fileio.c:3281:27: call_function: calling ‘FIO_openSrcFile’ from ‘getFileInfo_fileConfirmed’
zstd-1.5.7/programs/fileio.c:3281:27: return_function: returning to ‘getFileInfo_fileConfirmed’ from ‘FIO_openSrcFile’
zstd-1.5.7/programs/fileio.c:3282:5: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/fileio.c:3284:28: branch_false: ...to here
zstd-1.5.7/programs/fileio.c:3284:28: danger: ‘FIO_openSrcFile(0, inFileName, & srcFileStat)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/9)
# 3282| ERROR_IF(srcFile == NULL, info_file_error, "Error: could not open source file %s", inFileName);
# 3283|
# 3284|-> info->compressedSize = UTIL_getFileSizeStat(&srcFileStat);
# 3285| status = FIO_analyzeFrames(info, srcFile);
# 3286|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/fileio_asyncio.c:173:27: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
zstd-1.5.7/programs/fileio_asyncio.c:547:16: enter_function: entry to ‘AIO_ReadPool_create’
zstd-1.5.7/programs/fileio_asyncio.c:548:49: acquire_memory: allocated here
zstd-1.5.7/programs/fileio_asyncio.c:549:7: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
zstd-1.5.7/programs/fileio_asyncio.c:550:5: branch_false: ...to here
zstd-1.5.7/programs/fileio_asyncio.c:550:5: call_function: calling ‘AIO_IOPool_init’ from ‘AIO_ReadPool_create’
# 171| * decompress into and 1 buffer that's actively written to disk and owned by the writing thread. */
# 172| assert(MAX_IO_JOBS >= 2);
# 173|-> ctx->threadPool = POOL_create(1, MAX_IO_JOBS - 2);
# 174| ctx->threadPoolActive = 1;
# 175| if (!ctx->threadPool)
Error: GCC_ANALYZER_WARNING (CWE-415):
zstd-1.5.7/programs/util.c:103:5: warning[-Wanalyzer-double-free]: double-‘free’ of ‘ptr’
zstd-1.5.7/programs/util.c:1339:6: enter_function: entry to ‘UTIL_expandFNT’
zstd-1.5.7/programs/util.c:1341:36: call_function: calling ‘UTIL_createExpandedFNT’ from ‘UTIL_expandFNT’
# 101| void *newptr = realloc(ptr, size);
# 102| if (newptr) return newptr;
# 103|-> free(ptr);
# 104| return NULL;
# 105| }
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/util.c:896:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
zstd-1.5.7/programs/util.c:1293:1: enter_function: entry to ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1296:24: acquire_memory: allocated here
zstd-1.5.7/programs/util.c:1299:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1302:23: branch_false: ...to here
zstd-1.5.7/programs/util.c:1302:41: branch_true: following ‘true’ branch (when ‘ifnNb < nbIfns’)...
zstd-1.5.7/programs/util.c:1303:45: branch_true: ...to here
zstd-1.5.7/programs/util.c:1303:18: call_function: calling ‘UTIL_isDirectory’ from ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1303:18: return_function: returning to ‘UTIL_createExpandedFNT’ from ‘UTIL_isDirectory’
zstd-1.5.7/programs/util.c:1303:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1318:38: branch_false: ...to here
zstd-1.5.7/programs/util.c:1318:38: call_function: calling ‘UTIL_prepareFileList’ from ‘UTIL_createExpandedFNT’
# 894| int nbFiles = 0;
# 895|
# 896|-> if (!(dir = opendir(dirName))) {
# 897| UTIL_DISPLAYLEVEL(1, "Cannot open directory '%s': %s\n", dirName, strerror(errno));
# 898| return 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/util.c:896:17: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
zstd-1.5.7/programs/util.c:1293:1: enter_function: entry to ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1299:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1302:23: branch_false: ...to here
zstd-1.5.7/programs/util.c:1302:41: branch_true: following ‘true’ branch (when ‘ifnNb < nbIfns’)...
zstd-1.5.7/programs/util.c:1303:45: branch_true: ...to here
zstd-1.5.7/programs/util.c:1303:18: call_function: calling ‘UTIL_isDirectory’ from ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1303:18: return_function: returning to ‘UTIL_createExpandedFNT’ from ‘UTIL_isDirectory’
zstd-1.5.7/programs/util.c:1303:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1318:38: branch_false: ...to here
zstd-1.5.7/programs/util.c:1318:38: call_function: calling ‘UTIL_prepareFileList’ from ‘UTIL_createExpandedFNT’
# 894| int nbFiles = 0;
# 895|
# 896|-> if (!(dir = opendir(dirName))) {
# 897| UTIL_DISPLAYLEVEL(1, "Cannot open directory '%s': %s\n", dirName, strerror(errno));
# 898| return 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/util.c:903:21: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
zstd-1.5.7/programs/util.c:1293:1: enter_function: entry to ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1296:24: acquire_memory: allocated here
zstd-1.5.7/programs/util.c:1299:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1302:23: branch_false: ...to here
zstd-1.5.7/programs/util.c:1302:41: branch_true: following ‘true’ branch (when ‘ifnNb < nbIfns’)...
zstd-1.5.7/programs/util.c:1303:45: branch_true: ...to here
zstd-1.5.7/programs/util.c:1303:18: call_function: calling ‘UTIL_isDirectory’ from ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1303:18: return_function: returning to ‘UTIL_createExpandedFNT’ from ‘UTIL_isDirectory’
zstd-1.5.7/programs/util.c:1303:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1318:38: branch_false: ...to here
zstd-1.5.7/programs/util.c:1318:38: call_function: calling ‘UTIL_prepareFileList’ from ‘UTIL_createExpandedFNT’
# 901| dirLength = strlen(dirName);
# 902| errno = 0;
# 903|-> while ((entry = readdir(dir)) != NULL) {
# 904| char* path;
# 905| size_t fnameLength, pathLength;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/util.c:903:21: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirName)’
zstd-1.5.7/programs/util.c:1293:1: enter_function: entry to ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1299:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1302:23: branch_false: ...to here
zstd-1.5.7/programs/util.c:1302:41: branch_true: following ‘true’ branch (when ‘ifnNb < nbIfns’)...
zstd-1.5.7/programs/util.c:1303:45: branch_true: ...to here
zstd-1.5.7/programs/util.c:1303:18: call_function: calling ‘UTIL_isDirectory’ from ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1303:18: return_function: returning to ‘UTIL_createExpandedFNT’ from ‘UTIL_isDirectory’
zstd-1.5.7/programs/util.c:1303:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1318:38: branch_false: ...to here
zstd-1.5.7/programs/util.c:1318:38: call_function: calling ‘UTIL_prepareFileList’ from ‘UTIL_createExpandedFNT’
# 901| dirLength = strlen(dirName);
# 902| errno = 0;
# 903|-> while ((entry = readdir(dir)) != NULL) {
# 904| char* path;
# 905| size_t fnameLength, pathLength;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/util.c:903:21: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
zstd-1.5.7/programs/util.c:1293:1: enter_function: entry to ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1299:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1302:23: branch_false: ...to here
zstd-1.5.7/programs/util.c:1302:41: branch_true: following ‘true’ branch (when ‘ifnNb < nbIfns’)...
zstd-1.5.7/programs/util.c:1303:45: branch_true: ...to here
zstd-1.5.7/programs/util.c:1303:18: call_function: calling ‘UTIL_isDirectory’ from ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1303:18: return_function: returning to ‘UTIL_createExpandedFNT’ from ‘UTIL_isDirectory’
zstd-1.5.7/programs/util.c:1303:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1318:38: branch_false: ...to here
zstd-1.5.7/programs/util.c:1318:38: call_function: calling ‘UTIL_prepareFileList’ from ‘UTIL_createExpandedFNT’
# 901| dirLength = strlen(dirName);
# 902| errno = 0;
# 903|-> while ((entry = readdir(dir)) != NULL) {
# 904| char* path;
# 905| size_t fnameLength, pathLength;
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/util.c:910:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
zstd-1.5.7/programs/util.c:1293:1: enter_function: entry to ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1296:24: acquire_memory: allocated here
zstd-1.5.7/programs/util.c:1299:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1302:23: branch_false: ...to here
zstd-1.5.7/programs/util.c:1302:41: branch_true: following ‘true’ branch (when ‘ifnNb < nbIfns’)...
zstd-1.5.7/programs/util.c:1303:45: branch_true: ...to here
zstd-1.5.7/programs/util.c:1303:18: call_function: calling ‘UTIL_isDirectory’ from ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1303:18: return_function: returning to ‘UTIL_createExpandedFNT’ from ‘UTIL_isDirectory’
zstd-1.5.7/programs/util.c:1303:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1318:38: branch_false: ...to here
zstd-1.5.7/programs/util.c:1318:38: call_function: calling ‘UTIL_prepareFileList’ from ‘UTIL_createExpandedFNT’
# 908| fnameLength = strlen(entry->d_name);
# 909| path = (char*) malloc(dirLength + fnameLength + 2);
# 910|-> if (!path) { closedir(dir); return 0; }
# 911| memcpy(path, dirName, dirLength);
# 912|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/util.c:910:22: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
zstd-1.5.7/programs/util.c:1293:1: enter_function: entry to ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1299:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1302:23: branch_false: ...to here
zstd-1.5.7/programs/util.c:1302:41: branch_true: following ‘true’ branch (when ‘ifnNb < nbIfns’)...
zstd-1.5.7/programs/util.c:1303:45: branch_true: ...to here
zstd-1.5.7/programs/util.c:1303:18: call_function: calling ‘UTIL_isDirectory’ from ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1303:18: return_function: returning to ‘UTIL_createExpandedFNT’ from ‘UTIL_isDirectory’
zstd-1.5.7/programs/util.c:1303:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1318:38: branch_false: ...to here
zstd-1.5.7/programs/util.c:1318:38: call_function: calling ‘UTIL_prepareFileList’ from ‘UTIL_createExpandedFNT’
# 908| fnameLength = strlen(entry->d_name);
# 909| path = (char*) malloc(dirLength + fnameLength + 2);
# 910|-> if (!path) { closedir(dir); return 0; }
# 911| memcpy(path, dirName, dirLength);
# 912|
Error: GCC_ANALYZER_WARNING (CWE-401):
zstd-1.5.7/programs/util.c:935:33: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
zstd-1.5.7/programs/util.c:1293:1: enter_function: entry to ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1299:8: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1302:23: branch_false: ...to here
zstd-1.5.7/programs/util.c:1302:41: branch_true: following ‘true’ branch (when ‘ifnNb < nbIfns’)...
zstd-1.5.7/programs/util.c:1303:45: branch_true: ...to here
zstd-1.5.7/programs/util.c:1303:18: call_function: calling ‘UTIL_isDirectory’ from ‘UTIL_createExpandedFNT’
zstd-1.5.7/programs/util.c:1303:18: return_function: returning to ‘UTIL_createExpandedFNT’ from ‘UTIL_isDirectory’
zstd-1.5.7/programs/util.c:1303:16: branch_false: following ‘false’ branch...
zstd-1.5.7/programs/util.c:1318:38: branch_false: ...to here
zstd-1.5.7/programs/util.c:1318:38: call_function: calling ‘UTIL_prepareFileList’ from ‘UTIL_createExpandedFNT’
# 933| *bufEnd = *bufStart + newListSize;
# 934| } else {
# 935|-> free(path); closedir(dir); return 0;
# 936| }
# 937| }
Error: CPPCHECK_WARNING (CWE-682):
zstd-1.5.7/programs/util.c:1297: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1295| unsigned nbFiles;
# 1296| char* buf = (char*)malloc(LIST_SIZE_INCREASE);
# 1297|-> char* bufend = buf + LIST_SIZE_INCREASE;
# 1298|
# 1299| if (!buf) return NULL;
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/tests/fullbench.c: scope_hint: In function ‘prepLiterals’
zstd-1.5.7/tests/fullbench.c:189:12: warning[-Wmaybe-uninitialized]: ‘MEM <unsigned int> [(struct *)&bp]’ may be used uninitialized
# 189 | if (bp.blockType != bt_compressed) {
# | ^
zstd-1.5.7/tests/fullbench.c:187:27: note: ‘MEM <unsigned int> [(struct *)&bp]’ was declared here
# 187 | { blockProperties_t bp;
# | ^
# 187| { blockProperties_t bp;
# 188| ZSTD_getcBlockSize((char*)dst+frameHeaderSize, dstCapacity, &bp); /* Get 1st block type */
# 189|-> if (bp.blockType != bt_compressed) {
# 190| DISPLAY("no compressed literals\n");
# 191| return r;
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/tests/fullbench.c: scope_hint: In function ‘prepSequences1stBlock’
zstd-1.5.7/tests/fullbench.c:297:12: warning[-Wmaybe-uninitialized]: ‘MEM <unsigned int> [(struct *)&bp]’ may be used uninitialized
# 297 | if (bp.blockType != bt_compressed) {
# | ^
zstd-1.5.7/tests/fullbench.c:295:27: note: ‘MEM <unsigned int> [(struct *)&bp]’ was declared here
# 295 | { blockProperties_t bp;
# | ^
# 295| { blockProperties_t bp;
# 296| size_t const cBlockSize = ZSTD_getcBlockSize(ip, dstCapacity, &bp); /* Get 1st block type */
# 297|-> if (bp.blockType != bt_compressed) {
# 298| DISPLAY("no compressed sequences\n");
# 299| return r;
Error: CPPCHECK_WARNING (CWE-682):
zstd-1.5.7/tests/fullbench.c:537: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 535| size_t const prepCapacity = dstCapacity * 4;
# 536| void* prepBuffer = malloc(prepCapacity);
# 537|-> void* sequencesStart = (char*)prepBuffer + 2*sizeof(unsigned);
# 538| ZSTD_Sequence* const seqs = sequencesStart;
# 539| size_t const seqsCapacity = prepCapacity / sizeof(ZSTD_Sequence);
Error: CPPCHECK_WARNING (CWE-682):
zstd-1.5.7/tests/fullbench.c:579: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 577| size_t const prepCapacity = dstCapacity * 4;
# 578| void* prepBuffer = malloc(prepCapacity);
# 579|-> void* sequencesStart = (char*)prepBuffer + 3*sizeof(unsigned);
# 580| ZSTD_Sequence* const seqs = sequencesStart;
# 581| size_t const seqsCapacity = prepCapacity / sizeof(ZSTD_Sequence);
Error: CPPCHECK_WARNING (CWE-682):
zstd-1.5.7/tests/fullbench.c:636: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 634| size_t const prepCapacity = srcSize * 4;
# 635| void* prepBuffer = malloc(prepCapacity);
# 636|-> void* sequencesStart = (char*)prepBuffer + 2*sizeof(unsigned);
# 637| ZSTD_Sequence* const seqs = sequencesStart;
# 638| size_t const seqsCapacity = prepCapacity / sizeof(ZSTD_Sequence);
Error: GCC_ANALYZER_WARNING (CWE-835):
zstd-1.5.7/tests/fullbench.c:1146:20: warning[-Wanalyzer-infinite-loop]: infinite loop
zstd-1.5.7/tests/fullbench.c:1104:5: enter_function: entry to ‘main’
zstd-1.5.7/tests/fullbench.c:1146:20: danger: infinite loop here
zstd-1.5.7/tests/fullbench.c:1146:20: branch_true: if it ever follows ‘true’ branch, it will always do so...
zstd-1.5.7/tests/fullbench.c:1148:17: branch_true: ...to here
# 1144| } else if (argument[0]=='-') { /* Commands (note : aggregated commands are allowed) */
# 1145| argument++;
# 1146|-> while (argument[0]!=0) {
# 1147|
# 1148| switch(argument[0])
Error: COMPILER_WARNING:
zstd-1.5.7/tests/paramgrill.c: scope_hint: In function ‘createBuffers’
zstd-1.5.7/tests/paramgrill.c:1245:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
# 1245 | size_t* fileSizes = calloc(sizeof(size_t), nbFiles);
# | ^~~~~~
zstd-1.5.7/tests/paramgrill.c:1245:39: note: earlier argument should specify number of elements, later size of each element
# 1243| size_t totalSizeToLoad = (size_t)UTIL_getTotalFileSize(fileNamesTable, (U32)nbFiles);
# 1244| size_t benchedSize = MIN(BMK_findMaxMem(totalSizeToLoad * 3) / 3, totalSizeToLoad);
# 1245|-> size_t* fileSizes = calloc(sizeof(size_t), nbFiles);
# 1246| void* srcBuffer = NULL;
# 1247| int ret = 0;
Error: COMPILER_WARNING:
zstd-1.5.7/tests/paramgrill.c: scope_hint: In function ‘createMemoTableArray’
zstd-1.5.7/tests/paramgrill.c:1460:60: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
# 1460 | memoTable_t* const mtAll = (memoTable_t*)calloc(sizeof(memoTable_t),(ZSTD_STRATEGY_MAX + 1));
# | ^~~~~~~~~~~
zstd-1.5.7/tests/paramgrill.c:1460:60: note: earlier argument should specify number of elements, later size of each element
# 1458| const U32 memoTableLog)
# 1459| {
# 1460|-> memoTable_t* const mtAll = (memoTable_t*)calloc(sizeof(memoTable_t),(ZSTD_STRATEGY_MAX + 1));
# 1461| ZSTD_strategy i, stratMin = ZSTD_STRATEGY_MIN, stratMax = ZSTD_STRATEGY_MAX;
# 1462|
Error: COMPILER_WARNING:
zstd-1.5.7/tests/paramgrill.c:1497:47: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
# 1497 | mtAll[i].table = (BYTE*)calloc(sizeof(BYTE), mtl);
# | ^~~~
zstd-1.5.7/tests/paramgrill.c:1497:47: note: earlier argument should specify number of elements, later size of each element
# 1495| }
# 1496|
# 1497|-> mtAll[i].table = (BYTE*)calloc(sizeof(BYTE), mtl);
# 1498| mtAll[i].tableLen = mtl;
# 1499|
Error: COMPILER_WARNING (CWE-457):
zstd-1.5.7/tests/paramgrill.c: scope_hint: In function ‘BMK_generate_cLevelTable’
zstd-1.5.7/tests/paramgrill.c:2018:61: warning[-Wmaybe-uninitialized]: ‘testResult.cSpeed’ may be used uninitialized
# 2018 | BMK_init_level_constraints((int)((testResult.cSpeed * 31) / 32));
# | ^
zstd-1.5.7/tests/paramgrill.c:2016:27: note: ‘testResult.cSpeed’ was declared here
# 2016 | BMK_benchResult_t testResult;
# | ^
# 2016| BMK_benchResult_t testResult;
# 2017| BMK_benchParam(&testResult, buf, ctx, l1params);
# 2018|-> BMK_init_level_constraints((int)((testResult.cSpeed * 31) / 32));
# 2019| }
# 2020|
Error: CPPCHECK_WARNING (CWE-457):
zstd-1.5.7/tests/seqgen.c:38: error[uninitvar]: Uninitialized variables: stream.saved, stream.bytesLeft
# 36| XXH64_reset(&stream.xxh, 0);
# 37| stream.seed = seed;
# 38|-> return stream;
# 39| }
# 40|
Error: COMPILER_WARNING:
zstd-1.5.7/tests/zstreamtest.c: scope_hint: In function ‘basicUnitTests’
zstd-1.5.7/tests/zstreamtest.c:1899:32: warning[-Wunterminated-string-initialization]: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (7 chars into 6 available)
# 1899 | char testBuffer[6] = "\xAA\xAA\xAA\xAA\xAA\xAA";
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1897| /* Write a bunch of 6 byte blocks */
# 1898| while (remainingInput > 0) {
# 1899|-> char testBuffer[6] = "\xAA\xAA\xAA\xAA\xAA\xAA";
# 1900| const size_t kSmallBlockSize = sizeof(testBuffer);
# 1901| ZSTD_inBuffer in = {testBuffer, kSmallBlockSize, 0};