Go to main content
Oracle® Developer Studio 12.6: Discover and Uncover User's Guide

Exit Print View

Updated: June 2017
 
 

Memory Error Discovery Tool Oracle Developer Studio (discover)

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-12.4 or Oracle Developer Studio 12.5 or 12.6 compilers. It works on a SPARC–based or x86–based system running at least one of the following operating systems: Solaris 10 10/11, Oracle Solaris 11.3, Oracle Enterprise Linux 6.x, or Oracle Enterprise Linux 7.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

  • Freeing the same memory block multiple times

  • Memory leaks

  • Overlapping memory copy

  • Stale pointer accesses

  • Incorrect parameters to system library functions

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) can be instrumented with a single command, then run in the normal way. For information on how best to instrument your binary, see Supported Binaries. 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.