In the Linux environment, Rational Purify provides a comprehensive solution for finding errors and memory leaks. This article features a simple C program and a more complex C++ program that gives you a good idea of how you can successfully integrate Purify into your Linux development environment with very little effort.
I used to use Purify on MIPS (which could instrument release binaries, and didn’t require modified compilers or linkers) and liked it a lot.
I use Valgrind on x86 (mostly because it’s free), and I like that I can run it on binaries which aren’t built specially (which is useful when debugging errors which only emerge under certain optimization conditions).
So, what is the advantage of Purify over Valgrind on Linux?
–ralpht
>So, what is the advantage of Purify over Valgrind on Linux?
I haven’t used any of the two, but I heard that Purify is way more powerful than Valgrind. It catches more issues, a commercial linux developer told me recently.
I’ve used Purify for more than ten years as a developer, and while it is a good product, it is not “way more powerful than Valgrind”. Purify and Valgrind attack much the same issues. Purify has a much nicer GUI, but I can’t think of anything significant it can do that valgrind can’t. There’s also the problem that the support for it has decreased substantially over the years compared to what it was when there was a Pure Software Inc. or even a Pure/Atria; Atria ate Pure, Rational ate Atria, and IBM ate Rational, and the result is that the product is much less important to its owner than it was. That’s a real problem with proprietary software; without excellent support you may have severe problems.
valgrind, unlike Purify and its sister tools from Rational (Quantify, PureCov etc), can model cache effects, can run on any executable without a special link step, and is extendable (more tools can be built on top of the valgrind core engine).
valgrind is only mature for x86 Linux, though PowerPC and x86-64 versions are being worked on, so if you need to deal with Solaris or Windows you’ll need Purify.
I wanted to look into Purify for a nasty bug that nor Valgrind, I or any other mem checker I tried could find. So, I went an downloaded an evaluation copy of Purify, with full intent to convince my managers to purchase a copy if it worked and helped me find the bug. Downloading and installing wasn’t such a big deal, normal procedure for commerical stuff on Linux.
But, apparently I had to obtain some kind of license in order to use Purify at all. I checked the homepage again and filled in the necessary details for a evaluation license request. Did I get a license? No, the request page said that “a sales representative will contact me Real Soon Now”. WTF? Who uses sales reps for evaluation stuff? Well, a sales rep sent a mail after day or two (or more, don’t remember) asking for more details for the evaluation, but at this point I had already deleted Purify and rewritten parts of my application to work around the bug.
As a result for the horribly complex and dead slow process I never ended up evaluating nor buying Purify. Why do they have to make it so damn hard to test the app? Usually talking to a pushy sales rep gives me a worse image of an application than if I can test it *when I want to*. Sigh, maybe it’s my loss too if Purify is as good as people say, but they probably lose quite a few sales due to their silly system.