Menu

cppcheck hang

Guy Maurel
5 days ago
3 days ago
  • Guy Maurel

    Guy Maurel - 5 days ago

    Hello!
    I am the maintainer of https://github.com/uncrustify/uncrustify
    I try to use cppcheck with our sources.
    At least one source file produces a "infinite loop" :
    https://github.com/uncrustify/uncrustify/src/indent.cpp

    What shall I do to find out where is the bug?
    Which tools may I use for that.

    Thanks for any hint
    guy

     
  • CHR

    CHR - 4 days ago

    There are lots of if conditions in that file. cppcheck is known to have performance issues on such code, see e.g. https://trac.cppcheck.net/ticket/11262
    So it's probably not a real hang that you are seeing, but an extremely long execution time.

     
  • john borland

    john borland - 3 days ago

    I often use Flame Graphsto track down performance issues. It has been some time since I have profiled cppcheck. Last time I looked at it some of the valueflow functions could escalate run time. I wasn't smart enough to figure out any useful ways of dealing with it back then. On linux there is a tool called perf top I can often use to get I high level view for performance offenders. Then there is GDB if I really need to break in to see if a program is stuck.

     

Log in to post a comment.