Discover and Uncover

There are two new tools in the 12.2 release of Oracle Solaris Studio. Discover detects memory leaks, and Uncover measures code coverage in an application:

Discover:

Memory-related errors in programs are notoriously difficult to find. Discover allows 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 and does not initialize it, then tries to read from one of the array locations, the program will probably behave erratically. Discover 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
  • Memory leaks

Discover is simple to use. Any binary (even a fully optimized binary) that has been prepared by the compiler 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.

Uncover:

Uncover is a simple and easy to use command-line tool for measuring code coverage of applications. Code coverage is an important part of software testing. It gives you information on which areas of your code are exercised in testing and which are not, enabling you to improve your test suites to test more of your code. The coverage information reported by Uncover can be at a function, statement, basic block, or instruction level.

Uncover provides a unique feature called uncoverage, which allows you to quickly find major functional areas that are not being tested. Other advantages of Uncover code coverage over other types of instrumentation are:

  • The slowdown relative to uninstrumented code is fairly small.
  • Since Uncover operates on binaries, it can work with any optimized binary.
  • Measurements can be done by instrumenting the shipping binary. The application does not have to be built differently for coverage testing.
  • Uncover provides a simple procedure for instrumenting the binary, running tests, and displaying the results.
  • Uncover is multithread safe and multiprocess safe.
Complete documentation on Discover and Uncover is here.
Comments:

Post a Comment:
Comments are closed for this entry.
About


Deep thoughts on compiling C, C++, and Fortran codes with Oracle Solaris Studio compilers, especially optimization and parallelization, from the Solaris Studio documentation lead, Richard Friedman. Email him at
Richard dot Friedman at Oracle dot com

When Run Was A Compiler

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today