Menu

differences between 1.68 and 1.72

2016-04-07
2016-04-09
  • Bill Torpey

    Bill Torpey - 2016-04-07

    I notice some new checks in 1.72, as well as overall improvements -- thanks!

    But I'm curious about some of the checks that have apparently been removed, and why:
    Writing beyond bounds of a buffer
    Non reentrant functions
    Obsolete functions
    double free() or double closedir()
    etc.

    I'm also curious about why certain checks trigger in some cases and not others. For instance, with 1.68 I get "C-style pointer casting" warnings. I get that warning on some of the same code w/1.72, but other code that triggered the warning w/1.68 no longer does with 1.72.

    Thanks in advance for any assistance!

     
  • Mr. X

    Mr. X - 2016-04-08

    Obsolete functions
    Non reentrant functions

    Both have been replaced by CheckFunctions. It now works differently, obsolete/non-reentrant functions can be defined in .cfg files. For most functions we checked for in 1.68, proper configurations have been added to the .cfg files.

    double free() or double closedir()
    Writing beyond bounds of a buffer

    These checks should still work. If you have found false negatives, please report them!

    Btw., we have release notes for each release, you can view them here:
    http://trac.cppcheck.net/roadmap?show=completed

     
    • Bill Torpey

      Bill Torpey - 2016-04-08

      Thanks for the info!

      FWIW, I started out by comparing the output of cppcheck --doc/--errorlist between the two versions, and there are a few cases where they don't match up (and I can't figure out where the functionality moved to in the newer version) -- hence the question.

      I do see from the release notes that checks get removed from time to time. I guess that makes sense, esp. if the implementation that supports the check changes in a way that requires addl effort to retain it, and compilers support it (or in the case of something like unnecessaryQualification, stop flagging it).

      Perhaps this comes under the heading of "When all else fails, read the documentation", but I'm curious what process, if any, you use to regression-test new releases?

      Thanks again!

       
  • Mr. X

    Mr. X - 2016-04-09

    We have a large test suite of small code snippets which we use for both false negative and false positive testing. You can find the test suite here: https://github.com/danmar/cppcheck/tree/master/test

     

Log in to post a comment.