Jump to content

Dynamic program analysis

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DatabACE (talk | contribs) at 05:55, 10 November 2008 (Examples of Tools). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Dynamic program analysis is the analysis of computer software that is performed with executing programs built from that software on a real or virtual processor (analysis performed without executing programs is known as static code analysis). Dynamic program analysis tools may require loading of special libraries or even recompilation of program code.

For dynamic program analysis to be effective, the target program must be executed with sufficient test inputs to produce interesting behavior. Use of software testing techniques such as code coverage helps to ensure that an adequate slice of the program's set of possible behaviors has been observed.

Care must be taken to minimize the effect that instrumentation or probing has on the execution (including temporal properties) of the target program, to minimize the appearance of Heisenbugs.

Examples of Tools

  • Daikon is an implementation of dynamic invariant detection. Daikon runs a program, observes the values that the program computes, and then reports properties that were true over the observed executions, and thus likely true over all executions.
  • Dmalloc, library for checking memory allocation and leaks. Software must be recompiled, and all files must include the special C header file dmalloc.h.
  • DynInst is a runtime code-patching library that is useful in developing dynamic program analysis probes and applying them to compiled executables. Dyninst does not require source code or recompilation in general, however non-stripped executables and executables with debugging symbols present are easier to instrument.
  • Holodeck from Security Innovation, Inc. is a fault simulation tool for dynamic analysis and fragility/security testing of Windows programs.
  • IBM Rational Purify: mainly memory corruption detection and memory leak detection.
  • BoundsChecker: comparable to IBM's Purify.
  • Valgrind runs programs on a virtual processor and can detect memory errors (e.g. misuse of malloc and free) and race conditions in multithread programs.
  • VB Watch injects dynamic analysis code into Visual Basic programs to monitor their performance, call stack, execution trace, instantiated objects, variables and code coverage.

Most performance analysis tools use dynamic program analysis techniques.[citation needed]

Historical examples

See also