Menu

latest cppcheck hangs indefinitely

Martin
2021-02-08
2021-02-24
  • Martin

    Martin - 2021-02-08

    Hi,

    the latest cppcheck (main branch) hangs indefinitely on the attached file. This must have been introduced only in the last few days.
    Could you please check?

    Thanks,
    Martin

     
  • Daniel Marjamäki

    Thanks! As far as I see it's caused by f48e195c31f8f7de60826036f2fc797c9e7f942c

     
  • Martin

    Martin - 2021-02-12

    The kind of hang seems to be back with the latest cppcheck main branch, please check the attached file.

     
    • Robert Reif

      Robert Reif - 2021-02-12
       
  • Martin

    Martin - 2021-02-15

    cppcheck master from Friday (with this commit) now hangs on the attached file :-(
    This time I'm not sure though if it's another root cause.

     
    • Robert Reif

      Robert Reif - 2021-02-17
       
  • Martin

    Martin - 2021-02-18

    Unfortunately, now the attached file has this hang.
    I'm really sorry that this turns into such a ping-pong-game, but it's hard for me to reduce the original file to a small, handy one, while preserving all the constructs that produce hangs, since I obviously don't know which parts (constructs) are relevant and which aren't :-/

     

    Last edit: Martin 2021-02-18
    • Robert Reif

      Robert Reif - 2021-02-18

      I just noticed I simplified your previous example too much. There were multiple problems in 21-02-15.cpp and I only fixed one. The second problem which causes a hang is because the class foo is not defined anywhere. I have a fix for this hang and I'll push a PR in a few minutes for it. The next problem is we are incorrectly simplifying the code because of the missing class. I don't have a fix for that yet. Your latest example has the same problem. Thanks for providing the examples.

       
  • Martin

    Martin - 2021-02-22

    Attached is the latest hang of this kind, with the latest cppcheck.

     
    • Robert Reif

      Robert Reif - 2021-02-23
       
  • Martin

    Martin - 2021-02-23

    With this PR, here's the latest hang.

     
    • Robert Reif

      Robert Reif - 2021-02-23
       
  • Martin

    Martin - 2021-02-24

    Congratulations, you've beaten the final boss; there are no more hangs in code I have to offer.
    Thank you very much!

     
    • Robert Reif

      Robert Reif - 2021-02-24

      Thank you for providing the great example code.

       

Log in to post a comment.