Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Studio 12.3: Discover and Uncover User's Guide Oracle Solaris Studio 12.3 Information Library |
2. Memory Error Discovery Tool (Discover)
Requirements for Using Discover
Binaries Must Be Prepared Correctly
Binaries That Use Preloading or Auditing Cannot Be Used
Binaries That Redefine Standard Memory Allocation Functions Can Be Used
Instrumenting a Prepared Binary
Instrumenting Shared Libraries
SUNW_DISCOVER_OPTIONS Environment Variable
SUNW_DISCOVER_FOLLOW_FORK_MODE Environment Variable
Memory Access Errors and Warnings
Interpreting Discover Error Messages
Limitations When Using Discover
Only Annotated Code is Instrumented
Machine Instruction Might Differ From Source Code
Compiler Options Affect the Generated Code
System Libraries Can Affect the Errors Reported
Custom Memory Management Can Affect the Accuracy of the Data
Out of Bounds Errors for Static and Automatic Arrays Cannot Be Detected
After you have instrumented your binary with Discover, you run it the same way you would ordinarily. Typically, if a particular combination of input causes your program to behave strangely, you would instrument it with Discover and run it with the same input to investigate potential memory problems. While the instrumented program is running, Discover writes information about any memory problems it finds to the specified output files in the selected formats (text, HTML, or both). For information on interpreting the reports, see Analyzing Discover Reports.
Because of the overhead of the instrumentation, your program runs significantly slower after you instrument it. Depending on the frequency of memory access, it might run as much as 50 times slower.