You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Infinite loop while parsing template with deprecation warning #4250
I've found what looks to be an infinite loop problem in uncrustify with a particular piece of code in our codebase. The original code is here, but the problematic function is:
Then uncrustify goes into an infinite loop. If I remove the template argument, it doesn't loop forever. If I remove the deprecation warning, it doesn't loop forever. If I make it a standalone function (not inside the class), it doesn't loop forever.
Going back through uncrustify history, here are some working and failing versions:
uncrustify-0.72.0 - works
uncrustify-0.73 - works
uncrustify-0.74.0 - loops forever
uncrustify-0.75.1 - loops forever
uncrustify-0.78.1-138-e312b0e41 - loops forever
I can't attach a debug.txt (as produced by the -p option), since the infinite loop prevents that from being created. Also, setting debug_max_number_of_loops seems to have no effect here, and it loops forever anyway.
I can get some debug information by running:
./uncrustify -c etc/defaults.cfg /path/to/code/above.cpp -L A 2>A.txt
Activity
guy-maurel commentedon Mar 7, 2024
PR #4257 is a bug fix proposal.
Please test it and report.