Insure++
Template:Short description {{#invoke:Infobox|infobox}}Template:Template other{{#invoke:Check for unknown parameters | check | showblankpositional=1 | unknown = Template:Main other | preview = Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y | AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo upright | logo size | logo title | logo_alt | logo_caption | logo_upright | logo_size | logo_title | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot upright | screenshot size | screenshot title | screenshot_alt | screenshot_upright | screenshot_size | screenshot_title | service_name | size | standard | title | ver layout | website | qid }}Template:Main other
Insure++ is a memory debugger computer program, used by software developers to detect various errors in programs written in C and C++. It is made by Parasoft, and is functionally similar to other memory debuggers, such as Purify, Valgrind and Dr Memory.<ref name="survey">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
OverviewEdit
Insure++ can automatically find erroneous accesses to freed memory (use-after-free situations), array-bounds violations, freeing unallocated memory (which often happens when a programmer frees the same memory twice, or when he frees global or stack memory), and many others.<ref>Template:Cite book</ref>
Unlike Purify and Valgrind, Insure++ inserts its instrumentation at the source-code level,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>Template:Cite book</ref>Template:Clarify which allows it to detect errors that the other tools miss.<ref>Template:Cite book</ref> In particular, Insure++ can detect buffer overflows in automatic arrays, and overflows which involve pointers that accidentally "jump" from one valid memory region to another, as in the following example:
<syntaxhighlight lang="c">
- include <stdlib.h>
int main()
{ char *p = malloc(1024); /* first dynamically-allocated block */ char *q = malloc(1024); /* second block */ p += 1200; /* At this point, "p" is likely to point into the second block. However, false assumptions about the real behaviour lead to mistakes. */ *p = 'a'; /* invalid write (past the end of the first block) */ }
</syntaxhighlight>
The source-level instrumentation allows it to not only identify that a leak occurred, but where it occurred.<ref name="survey"/> Some tools merely provide information about where the memory was allocated, Insure++ also gives a stack trace for when/where the actual leak occurred.
Additionally, Insure++ will produce Linear Code Sequence and Jump Code Coverage metrics for all tested code.