findbugs for C/C++?

Discussion in 'C++' started by yusufm@gmail.com, Mar 3, 2006.

  1. Guest

    Is there a findbugs type tool that analyzes C/C++ code?

    Thanks.
     
    , Mar 3, 2006
    #1
    1. Advertising

  2. wrote:
    > Is there a findbugs type tool that analyzes C/C++ code?


    I don't know what 'findbugs' is, but perhaps you should check out
    'PC-lint'.

    V
    --
    Please remove capital As from my address when replying by mail
     
    Victor Bazarov, Mar 3, 2006
    #2
    1. Advertising

  3. wrote:
    > Is there a findbugs type tool that analyzes C/C++ code?
    >
    > Thanks.
    >


    Maybe it is off-topic but I'd suggest you to check out Test-Driven
    Development techniques. It is REALLY good thing to catch logic bugs.
     
    Aleksander Beluga, Mar 3, 2006
    #3
  4. wrote:
    > Is there a findbugs type tool that analyzes C/C++ code?


    I don't know what "findbugs" does but there are several tools which
    capture certain kinds of errors:
    - Most compilers will warn about certain supposedly problematic
    code. You might consider even compiling your code with different
    compilers to get different kinds of warning. Note, however, that
    not all warnings are really justified and that the compilers
    frequently warn about perfectly OK code.
    - PC-Lint and QA-C++ are two tools which do statical analysis of
    C++ code beyond the warnings issues by compilers. They e.g. do
    whole program analysis and can be configured to check for certain
    stylistic restrictions. However, I have never really used these
    products in a real project.
    - Purify locates problems at run time at the cost of decreased
    performance. For example, purify detects uninitialized memory
    reads, freed memory writes, out of bounds accesses, etc. It is a
    brilliant tool although running the purified code will takes
    quite long to execute.
    - Some STL implementations have a debugging mode which can be
    enabled to detect certain violations of restrictions, e.g. using
    invalidated iterators.

    If at all affordable, using multiple or even all of these tools
    could detect many bugs. Especially the run-time tools (debug
    versions of STL and purify) work best when combined with extensive
    testsuites for your code and possibly verifying coverage with a
    tool, too, e.g. purecov or gcov. I enjoyed working in a setting
    where code could only be checked in if a certain level of code
    coverage was guaranteed by tests and purify didn't issue any reports
    when the tests are run.
    --
    <mailto:> <http://www.dietmar-kuehl.de/>
    <http://www.eai-systems.com> - Efficient Artificial Intelligence
     
    Dietmar Kuehl, Mar 4, 2006
    #4
  5. Dave Steffen Guest

    Dietmar Kuehl <> writes:

    > wrote:
    > > Is there a findbugs type tool that analyzes C/C++ code?

    >
    > I don't know what "findbugs" does but there are several tools which
    > capture certain kinds of errors:

    [...]
    > - Purify locates problems at run time at the cost of decreased
    > performance. For example, purify detects uninitialized memory
    > reads, freed memory writes, out of bounds accesses, etc. It is a
    > brilliant tool although running the purified code will takes
    > quite long to execute.


    FWIW, Valgrind is a similar beastie, but open source and specific to
    certain platforms (x86 Linux). We've had much better luck with
    Valgrind than we did with Purify.

    ----------------------------------------------------------------------
    Dave Steffen, Ph.D. Nowlan's Theory: He who hesitates is not
    Software Engineer IV only lost, but several miles from the
    Numerica Corporation next freeway exit.
    ph (970) 419-8343 x27
    fax (970) 223-6797 The shortest distance between two points
    is under construction. -- Noelie Alito
     
    Dave Steffen, Mar 4, 2006
    #5
  6. Dave Steffen wrote:
    > FWIW, Valgrind is a similar beastie, but open source and specific to
    > certain platforms (x86 Linux). We've had much better luck with
    > Valgrind than we did with Purify.


    Thank you very much for pointing out valgrind! I had read the name
    before occasionally but I was unaware of the power of this tool. It
    looks indeed like an alternative to purify for Linux.
    --
    <mailto:> <http://www.dietmar-kuehl.de/>
    <http://www.eai-systems.com> - Efficient Artificial Intelligence
     
    Dietmar Kuehl, Mar 5, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    365
  2.  opalinski from opalpaweb

    How to use Findbugs 1.1 (as compared to say .95)

    opalinski from opalpaweb, Oct 2, 2006, in forum: Java
    Replies:
    2
    Views:
    410
    opalinski from opalpaweb
    Oct 2, 2006
  3. comp.lang.java.programmer

    Remove a Category from findbugs?

    comp.lang.java.programmer, Feb 22, 2007, in forum: Java
    Replies:
    2
    Views:
    411
    comp.lang.java.programmer
    Feb 23, 2007
  4. crazzybugger
    Replies:
    0
    Views:
    518
    crazzybugger
    Dec 21, 2007
  5. Paul Tomblin

    FindBugs issue with transient

    Paul Tomblin, Jul 23, 2008, in forum: Java
    Replies:
    7
    Views:
    347
    Daniel Pitts
    Jul 25, 2008
Loading...

Share This Page