Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space CPPTDESKDEV and version 2021.2

...

This topic explains how to run Flow Analysis to expose bugs such as use of uninitialized memory, null pointer dereferencing, division by zero, memory and resource leaks.

Info
iconfalse

Important

An optional Flow Analysis license (with C++test Automation Edition) is required to use Flow Analysis.

Running Flow Analysis

Flow Analysis is a new type of static analysis technology that uses several analysis techniques, including simulation of application execution paths, to identify paths that could trigger runtime defects. Defects detected include use of uninitialized memory, null pointer dereferencing, division by zero, memory and resource leaks.

...

  1. Identify or create a Test Configuration with your preferred Flow Analysis standard analysis settings.
  2. Start the test using the preferred Test Configuration.
  3. Review and respond to the results.
  4. (Optional) Fine-tune Flow Analysis settings as needed.

Configuring Batch-Mode Flow Analysis Analysis with cpptestcli

Regularly-schedule batch-mode Flow Analysis analysis should simply execute a built-in or custom Test Configuration that analyzes your project according to the Flow Analysis rules important to your team.

For example:

  • cpptestcli -data  /path/to/workspace  -resource "ProjectToTest" -config team://DataFlowAnalysis -publish

...

Anchor
mode
mode
Running Flow Analysis in Incremental Mode

...

Swapping of analysis data mode is enabled by default. In this mode, analysis data is written to disk. Swapping of analysis data uses the same persistent storage and is done in a similar process as incremental analysis. If analysis is run on a large project, the analysis data that represents a semantical model of the analyzed source code may consume all the memory available for running Flow Analysis. If this occurs, Flow Analysis will remove from memory parts of the analysis data that are not currently necessary and reread it from disk later.In general, we recommend running C++test in a large JVM heap configured with the Xmx JVM option. This is to minimize swapping, which results in greater performance.If sufficient memory is available, swapping of analysis data may be disabled, which may speed up code analysis. For information on how to disable swapping of analysis data please refer to Enable swapping of analysis data to disk bullet in the Performance Tab Options topic.

...