next up previous contents index
Next: gcov Up: TUTTI Reference Previous: splint   Contents   Index




insure_compiler is a wrapper for insure dynamic analysis tool. It as the same interface as the gnu compiler collection (gcc). The compiler wrapper will compile the source code using the parameters specified at command line. Insure will instrument the code for dynamic checking of the software. This results in instrumented binaries that will generate a insure_$<$arch$>$_$<$process$>$.txt files when the code is executed. Warnings resulting from insure compilation will not be available. Static analysis should be carried out by QAC or splint. See qac_compiler(1).

Insure configuration

The configuration of insure that is used during compilation is located in $TUTTIHOMEDIR/etc/insure_psrc.

Analyzing the results

After executing a program instrumented with the insure_compiler, a log files is generated in the working directory. Although this log file is human-readable, it is advisable to use insure_scan to parse the logging and convert it to legible information. See insure_scan(1). This program will also merge double entries in log files and will filter out the suppressed warnings as specified by $TUTTIHOMEDIR/etc/insure_suppress.txt.


insure_scan is a script which reads the log files resulting from a executing insure instrumented source code. The warnings are extracted and suppressions specified in the suppression file will be effectuated. Warnings which occur in the insure log files and that are not suppressed will be issued to the stdout device.


Normally, the output format of insure_scan is he same as the gcc compiler collection. This format is $<$file$>$,$<$line$>$,$<$message$>$. This allows the programming to parse the output by an editor. By default, the warning type (e.g. LEAK_RETURN) is only issued.
It is also possible to generate output in HTML output. Add -html as an optional argument for this purpose. HTML output will also contain the stack dumps that where encountered in the logging. Therefor, HTML is recommended for in-depth analysis of the insure results.

Insure suppression file format

insure_suppress.txt is the suppression configuration file that determines which warnings, issued by insure, must be suppressed (i.e. not shown by insure_scan) The file contains entries of the form:
WARNINGTYPE: <type> (,<type)*

where <type> is one of LEAK_ASSIGN, LEAK_SOPE, ...
where <allocation_stack> is a dump of the allocation stack
and <stack_trace> is a stack dump.


Suppression a memory leak for thread-specific data

The next example demonstrates a suppression for the thread_specific data allocated by a pthread_create. The LEAK_* warnings are be suppressed by specifying:

               block allocated at:

When this allocation stack is encountered in an insure log file and for a LEAK_SCOPE, LEAK_ASSIGN and LEAK_RETURN, the warning suppressed. The suppression can be read as follows. ``LEAK_SCOPE, LEAK_ASSIGN, LEAK_RETURN warnings are suppressed when allocated at valloc(), called from vmAllocPage, and so on''. It is obvious that, when suppressions are specified in more detail, less warnings will be suppressed by insure_scan(1).

For instance, when the allocation stack specified in the suppression file is longer, it will be less likely that a warning in the logging will match the suppression.

Suppression of a location-specific COPY_WILD warning


  Stack trace where the error occurred:
                            main()  wapgw_main.c, 150
when resulting from the main routine in the wapgw_main.c module. LINE NUMBERS IN STACK TRACES ARE IGNORED !!

Suppression all READ_WILD warnings

The next example will suppress all READ_WILD warnings:

next up previous contents index
Next: gcov Up: TUTTI Reference Previous: splint   Contents   Index