Menu

cppcheck 2.14.0 getting stuck

2024-05-22
2024-05-23
  • Peter Schops

    Peter Schops - 2024-05-22

    When I try to run the last SCA on my project, it is getting stuck in a
    header-file. The header-file names array.h contains multiple classes and
    their implementation. I added some debug options in cppcheck, to see if I
    can find where in cppcheck it is getting stuck, but without much luck.
    Also when I look in the dump-file I see the last line is .

    And tips on how to debug this issue with cppcheck?

    how I launch cppcheck:
    cppcheck --enable=warning,style,performance,information,portability
    --include=macro.h --suppress=missingInclude
    --suppress=missingIncludeSystem --suppress=containerOutOfBounds
    --suppress=unmatchedSuppression --debug --verbose --debug-warnings
    --report-progress --showtime=file --inconclusive
    --dump --platform=unix64 --std=c99 --language=c++ --library=mlx_xta
    --library=std --xml-version=2 global.cpp 2> /cpp-check/cpp-check.xml

    The output:
    Checking /builds/global.cpp ...
    Defines:
    Undefines:
    Includes:
    Platform:unix64
    Preprocessor::getConfigs: 3.4e-05s
    Tokenizer::createTokens: 0.002769s
    Tokenizer::simplifyTokens1::simplifyTokenList1::findGarbageCode: 0.000488s
    Tokenizer::simplifyTokens1::simplifyTokenList1::simplifyTypedef: 0.002735s
    Tokenizer::simplifyTokens1::simplifyTokenList1::simplifyTemplates: 1.56773s
    Tokenizer::simplifyTokens1::simplifyTokenList1::setVarId: 0.237636s
    Tokenizer::simplifyTokens1::simplifyTokenList1: 2.06874s
    Tokenizer::simplifyTokens1::createAst: 0.040213s
    Tokenizer::simplifyTokens1::createSymbolDatabase: 0.375032s
    Tokenizer::simplifyTokens1::setValueType: 0.171964s
    valueFlowEnumValue(symboldatabase, settings): 0.000869s
    valueFlowNumber(tokenlist, settings): 0.026728s
    valueFlowString(tokenlist, settings): 0.010819s
    valueFlowArray(tokenlist, settings): 0.009481s
    valueFlowUnknownFunctionReturn(tokenlist, settings): 3e-06s
    valueFlowGlobalConstVar(tokenlist, settings): 0.020459s
    valueFlowEnumValue(symboldatabase, settings): 0.000515s
    valueFlowGlobalStaticVar(tokenlist, settings): 0.021328s
    valueFlowPointerAlias(tokenlist, settings): 0.01162s
    valueFlowLifetime(tokenlist, errorLogger, settings): 0.119483s
    valueFlowSymbolic(tokenlist, symboldatabase, errorLogger, settings):
    0.010432s
    valueFlowBitAnd(tokenlist, settings): 0.011071s
    valueFlowSameExpressions(tokenlist, settings): 0.013322s
    valueFlowConditionExpressions(tokenlist, symboldatabase, errorLogger,
    settings): 6.2e-05s
    valueFlowImpossibleValues(tokenlist, settings): 0.020829s
    valueFlowSymbolicOperators(symboldatabase, settings): 0.007173s
    valueFlowCondition(SymbolicConditionHandler{}, tokenlist, symboldatabase,
    errorLogger, settings, skippedFunctions): 0.026334s
    valueFlowSymbolicInfer(symboldatabase, settings): 0.008124s
    valueFlowArrayBool(tokenlist, settings): 0.010139s
    valueFlowArrayElement(tokenlist, settings): 0.010593s
    valueFlowRightShift(tokenlist, settings): 0.010922s

     
  • CHR

    CHR - 2024-05-23

    Running cppcheck in a debugger, breaking and inspecting the stack trace once it gets stuck would probably give a clue. We have had a few performance regressions lately, e.g. https://trac.cppcheck.net/ticket/12329

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.