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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
There are lots of
ifconditions in that file. cppcheck is known to have performance issues on such code, see e.g. https://trac.cppcheck.net/ticket/11262So it's probably not a real hang that you are seeing, but an extremely long execution time.
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.