PurifyPlus
PurifyPlus is a memory debugger program used by software developers to detect memory access errors in programs, especially those written in C or C++. It was originally written by Reed Hastings of Pure Software.[1] Pure Software later merged with Atria Software to form Pure Atria Software, which in turn was later acquired by Rational Software, which in turn was acquired by IBM, and then divested to UNICOM Systems, Inc. on Dec 31, 2014. It is functionally similar to other memory debuggers, such as Insure++, Valgrind and BoundsChecker.
Original author(s) | Pure Software |
---|---|
Developer(s) | UNICOM Systems, a division of UNICOM Global |
Stable release | 7.5
/ January 26, 2017 |
Operating system | Windows, Linux, Solaris, AIX |
Type | Memory debugger |
License | Proprietary software |
Website | teamblue |
Overview
PurifyPlus allows dynamic verification, a process by which a program discovers errors that occur when the program runs, much like a debugger. Static verification or static code analysis, by contrast, involves detecting errors in the source code without ever compiling or running it, just by discovering logical inconsistencies. The type checking by a C compiler is an example of static verification.
When a program is linked with PurifyPlus, corrected verification code is automatically inserted into the executable by parsing and adding to the object code, including libraries. That way, if a memory error occurs, the program will print out the exact location of the error, the memory address involved, and other relevant information. PurifyPlus also detects memory leaks. By default, a leak report is generated at program exit but can also be generated by calling the PurifyPlus leak-detection API from within an instrumented application.
The errors that PurifyPlus discovers include array bounds reads and writes, trying to access unallocated memory, freeing unallocated memory (usually due to freeing the same memory for the second time), as well as memory leaks (allocated memory with no pointer reference). Most of these errors are not fatal (at least not at the site of the error), and often when just running the program there is no way to detect them, except by observing that something is wrong due to incorrect program behavior. Hence PurifyPlus helps by detecting these errors and telling the programmer exactly where they occur. Because PurifyPlus works by instrumenting all the object code, it detects errors that occur inside of third-party or operating system libraries. These errors are often caused by the programmer passing incorrect arguments to the library calls, or by misunderstandings about the protocols for freeing data structures used by the libraries. These are often the most difficult errors to find and fix.
Differences from traditional debuggers
The ability to detect non-fatal errors is a major distinction between PurifyPlus and similar programs from the usual debuggers. By contrast, debuggers generally only allow the programmer to quickly find the sources of fatal errors, such as a program crash due to dereferencing a null pointer, but do not help to detect the non-fatal memory errors. Debuggers are useful for other things that PurifyPlus is not intended for, such as for stepping through the code line by line or examining the program's memory by hand at a particular moment of execution. In other words, these tools can complement each other for a skilled developer.
PurifyPlus also includes other functionality, such as high-performance watchpoints, which are of general use while using a debugger on one's code.
It is worth noting that using PurifyPlus makes the most sense in programming languages that leave memory management to the programmer. Hence, in Java, Lisp, or Visual Basic, for example, automatic memory management reduces occurrence of any memory leaks. These languages can however still have leaks; unnecessary references to objects will prevent the memory from being re-allocated. IBM has a product called Rational Application Developer to uncover these sorts of errors.
Supported platforms
Operating System | Processor Architectures | Operating System versions | Compilers |
---|---|---|---|
Solaris | |||
Sun UltraSPARC | Solaris 11 base through 11.2 Solaris 10 base through U11 |
Sun C/C++ 5.8 through 5.13 GNU gcc/g++ 4.0 through 4.8 | |
AMD64 Intel 64 |
Solaris 11 base through 11.2 Solaris 10 U6 through U11 |
Sun C/C++ 5.8 through 5.10 GNU gcc/g++ 4.0 through 4.8 | |
Linux | |||
Intel IA-32 | RHEL 6 (Server/Desktop) base through 6.6 RHEL 5 (Server/Desktop) base through 5.11 SLES 11 base through SP3 |
GNU gcc/g++ 4.0 through 5.2 Intel icc 11.0 through 11.1 | |
AMD64 Intel 64 |
RHEL 6 (Server/Desktop) base through 6.6 RHEL 5 (Server/Desktop) base through 5.11 SLES 11 base through SP3 |
GNU gcc/g++ 4.0 through 5.2 Intel icc 11.0 through 11.1 | |
AIX | |||
IBM POWER7 | AIX 7.1 base through TL3 AIX 6.1 base through TL9 |
IBM XL C/C++ 12.1 IBM XL C/C++ 11.0 IBM XL C/C++ 10.1 | |
Windows | |||
IBM POWER6 | AIX 6.1 base through TL9 | IBM XL C/C++ 12.1 IBM XL C/C++ 11.0 IBM XL C/C++ 10.1 | |
Windows | |||
Intel IA-32 Intel 64 AMD 64 |
Microsoft Windows 10 base, Anniversary Edition Microsoft Windows 8 base through 8.1 Microsoft Windows 7 base through SP1 Microsoft Windows Server 2016 Standard, Data Center Microsoft Windows Server 2012 Foundation, Essential, Standard, Data Center Microsoft Windows Server 2008 Enterprise, Standard, Data Center, base through SP2 Microsoft Windows Server 2008 R2 Foundation, Enterprise, Standard, Data Center, base through SP1 |
Visual Studio 2008 through 2015 |
Platform | Data Collection Type | Runtime Environment |
---|---|---|
Windows | ||
C/C++ (unmanaged code) data collection | Microsoft Visual Studio 2008 through 2015 | |
Java code coverage data collection | IBM JRE 5 through 8 SUN JRE 1.5 through 1.8 | |
.NET (managed code) data collection | .NET Framework 2.0 through 4.5 used with Microsoft Visual Studio 2008 through 2015 |
References
- Purify: fast detection of memory leaks and access errors. by Reed Hastings and Bob Joyce, Usenix Winter 1992 technical conference.