0

is cppcheck able to keep track of malloc/dealloc or data flow over multiple files? Or does it analyse only single files seperately?

Joerg
  • 1

1 Answers1

0

There is a limited whole program analysis in cppcheck. Summaries are created for each function and then after all files have been analyzed those summaries are combined and checked if there is dangerous stuff. Well we need separate logic for whole program analysis.

There is no summary-based whole program analysis for memory leaks.

There is summary-based whole program analysis for:

  • array index out of bounds
  • one definition rule violations
  • null pointer dereference
  • unused functions
  • uninitialized variables
Daniel Marjamäki
  • 2,907
  • 15
  • 16