1.6.2 Testing:
Purify
Purify is another software tool that is used to detect memory errors
such as memory leaks and access errors.
It works by adding instruction sequences before each load and
store instruction in the executable file of the program it is being
used on. This allows memory errors to be detected, even
when with a third-party library whose source is unavailable. To use
purify with our software, follow the steps below.
- First change to the directory where you build your repository:
- Then execute the following commands
(the results of each command can be viewed by clicking
on the link to the right of the command):
- Run the program you are interested in testing. A Purify viewer
window will be created and will display error messages. The
messages can be expanded and collapsed by clicking on the
arrow to the left.
It is also possible to run purify without a viewer window. The
messages will be output in ASCII to either a log file or the
standard error stream. To enable this, enter the following
commands:
- Users that want more detailed debugging information from
the Purify output can compile the code in non-optimized
and debugging mode by using
make DEBUG=-g OPTIMIZE= test instead of
make test. Be sure to enter the space after
OPTIMIZE=. For more detailed documentation on
using Purify, type man purify.
|
|
|