More thoughts on C++ Tools (on Windows)

| 2 Comments

Last friday's rant about C++ static and dynamic analysis tools was picked up by Reddit and I have had quite a few helpful suggestions for other tools to try. Thanks!

  • Dr. Memory.
  • Microsoft's Application Verifier.
  • CPPDepend
  • PVS Studio
  • Microsoft's CRT Debug heap.
  • CLang - various options, especially using AddressSanitizer.

So far I've had a quick look at Dr. Memory, which seems to be pretty good. Free, easy to download and install and it's faster than DevPartner and 'just works'. Suppressing errors that aren't really errors is easy. Running it is easy and it feels like it will just fit into my work process without me having to conform to its idea of how I should be working. I can see me integrating it into my build server's workflow and running all of my tests through it. So far it has found a few obscure leaks for me; locale leaks (!) in some string format conversion code that nothing else has noticed. To me it feels like the tool BoundsChecker should have been and it doesn't have a pointless GUI, it's just a command line tool that does the job and produces easy to understand reports.

CppDepend also 'just works'. It's easy to get hold of a trial version and it installs and runs without issue. I've used it before and whilst it does spot some of the issues that something like Gimpel PC-Lint will spot it's much more geared towards enforcing corporate coding guidelines. Yes it's very configurable, but, out of the box it doesn't give me enough static analysis and gives me too much of other people's style rule infringements.

Microsoft's Application Verifier is better than I remember it being the last time I tried it (many years ago) but it's not as usable as Dr Memory.

I haven't downloaded PVS Studio as I figure that it doesn't really matter how good it is, the licensing is of the "we don't tell you how much it is until you ask us" variety of Enterpricey and the minimum license is for a team of 9...

The CLang options looks interesting but I haven't had the time to investigate fully yet.

So thank you Reddit. I now have a tool in my tool box that should help with my current client problems and several other tools to explore.

2 Comments

Please also give ReSharper C++ a try. It's a productivity Visual Studio extension for C++ developers, and it includes a number of static analyses like finding uninitialized variables/class members which might be useful in finding bugs.

Thanks, I'll take a look.

Leave a comment

About this Entry

It must be about time for a "the state of C++ tooling" rant... was the previous entry in this blog.

Practical Testing: 34 - Potential reentrant locking deadlock is the next entry in this blog.

I usually write about C++ development on Windows platforms, but I often ramble on about other less technical stuff...

Find recent content on the main index or look in the archives to find all content.

I have other blogs...

Subscribe to feed The Server Framework - high performance server development
Subscribe to feed Lock Explorer - deadlock detection and multi-threaded performance tools
Subscribe to feed l'Hexapod - embedded electronics and robotics
Subscribe to feed MegèveSki - skiing