The Memory Error Discovery Tool (discover) software is an advanced development tool for detecting memory access errors. The discover utility works on binaries compiled with Sun Studio 12 Update 1, Oracle Solaris Studio 12.2, Oracle Solaris Studio 12.3, or Oracle Solaris Studio 12.4 compilers. It works on a SPARC–based or x86–based system running at least the Solaris 10 10/08 operating system at least Oracle Solaris 11, Oracle Enterprise Linux 5.x, or Oracle Enterprise Linux 6.x.
Memory-related errors in programs are notoriously difficult to find. The discover utility enables you to find such errors easily by pointing out the exact place where the problem exists in the source code. For example, if your program allocates an array but does not initialize it, and then tries to read from one of the array locations, the program will probably behave erratically. The discover utility can catch this problem when you run the program in the normal way.
Other errors detected by discover include:
Reading from and writing to unallocated memory
Accessing memory beyond allocated array bounds
Incorrect use of freed memory
Freeing the wrong memory blocks
Because discover catches and reports memory access errors dynamically during program execution, if a portion of user code is not executed at runtime, errors in that portion are not reported.
The discover utility is simple to use. Any binary (even a fully optimized binary) that the compiler prepared can be instrumented with a single command, then run in the normal way. During the run, discover produces a report of the memory anomalies, which you can view as a text file or as HTML in a web browser.