CodeSonar Release 3.8, patchlevel 0: Release Notes



What's New

Visualization Award-winning UI for visualizing the program call graph.
Parallel Analysis The main CodeSonar analysis phase is now parallelized, and can run in parallel or serial mode. Parallel mode provides some fault tolerance along with better time performance.
CWE CodeSonar is now certified CWE-Compatible.
Annotation Import/Export User annotations on warnings can be exported from a hub; the resulting annotation files can be imported into other hubs.
Warning Group Scope By default, warning groups (and therefore, in particular, user annotations on warning groups) are shared between different projects on a hub. The previous behavior, where each warning group was associated with exactly one project, is still available.
Warning Classes There is one new warning class: Blocking in Critical Section.
STL Analysis Improvements/
Source File Patching
Application of new infrastructure improvements provides up to 38% drop in warning counts on projects using common STL implementations.
GUI A number of GUI pages have extended functionality.
Warning Search Language Extended with set operators.
Analysis Comparison Analysis pages provide up to three shortcut links for comparing the sets of warnings issued by two or more analyses.
Advanced Search Treatment for multiple terms in the same advanced search field has been standardized: the operator is now always OR.
Concurrency Modeling This version of CodeSonar has many new concurrency library models, and introduces modeling for additional features.
API Changes New Extension API prototypes allow users to write custom models to indicate blocking functions and data race exclusion.
AST Changes Minimal AST changes.
Configuration Parameter Changes There are several new parameters, and some parameters have been deleted.
Other Analysis Improvements General improvements to the CodeSonar analysis engine.
Miscellaneous Other items.

Changes To Requirements

For full, current requirements, see CodeSonar System Requirements.

Details

Visualization

The CodeSonar Web GUI now includes an interactive program visualization tool.

Parallel Analysis

The main CodeSonar analysis phase is now parallelized, and can run in parallel or serial mode. Parallel mode provides some fault tolerance along with better time performance, but requires more working memory than serial mode.

NOTE: Plug-in authors should either ensure that they implement sufficient interprocess coordination to ensure that global state in plug-ins is communicated correctly, or analyze in serial mode.

See section Parallelism in CodeSonar for a full discussion of the availability and extent of parallelization within CodeSonar.

Warning Classes

New warning class Blocking in Critical Section identifies calls to blocking functions from threads that currently hold one or more locks.

STL Analysis Improvements/Source File Patching

Application of new infrastructure improvements provides up to 38% drop in warning counts on projects using common STL implementations.

CodeSonar 3.8 introduces functionality for applying specified source file patches during the source modification step of the CodeSonar project build phase. As with command- and regular-expression-based source modifications, source file patching is generally applied in order to improve analysis results by removing code that cannot be analyzed, adding code that makes important relationships explicit, or both.

An important application is C++ template header patching. CodeSonar ships with a number of template header patches for C++ libraries:

STL STL header patches for use with gcc 3.x, gcc 4.x, and Visual Studio 6-10.
Boost Patches for some Boost headers. (These headers, and thus their corresponding patches, are compiler-independent.)

New configuration file parameter SOURCE_PATCH_DIRECTORIES is used to specify locations where CodeSonar should look for source file patches.

For full details, see sections Source File Patching and Source File Patching Example.

CWE

CWE-Compatible logo CodeSonar is now certified CWE-Compatible. (See CWE section for further information about CWE in CodeSonar)

This version of CodeSonar uses CWE version 2.2, published May 14, 2012.

Annotation Import/Export

CodeSonar's annotation import/export functionality enables users to copy user-editable warning fields (Priority, State, Finding, Owner, and Notes) between corresponding warnings on different hubs. See the Importing and Exporting Annotations section for full details.

Export functionality is available from the GUI Home and Project pages, from the Warnings tab of Analysis pages, and from Warning Search Results.

Import functionality is available either from the Home Page or from Project pages, depending on how the hub is set up for warning group sharing.

Warning Group Scope

The scope of a warning group specifies the extent to which the group (and its associated properties and annotations) is shared across a hub. This release introduces the notion of hub-scoped warning groups: in CodeSonar 3.7 and earlier, all warning groups were project-scoped. See Warning Group Scope for details.

This change has several effects:

Expanded Concurrency Modeling

Concurrency models for the following libraries have been added.

The following concurrency properties are now modeled.

GUI

The following GUI page types have been added or modified.

Visualization Tool New page type for visualization.
Side By Side Source Listings New page type for visualization.
Admin Settings Some reorganization; new hub setting "Share annotations between projects".
Advanced Search Search term interpretation changes as detailed here.
Analysis: all tabs New features:
  • Visualization link.
  • File Explorer. The File Explorer allows you to restrict the contents of any Analysis page tab to a single source file or directory tree. This restriction is applied in addition to any constraints arising from the current visibility filter selection.

    screenshot: expanding the file explorer

  • Analysis Comparison: shortcut links to compare with previous analysis and compare with next analysis, and functionality for constructing custom analysis comparisons.
Analysis: Warnings tab Always includes an annotation Export link.
Home Always includes an annotation Export link. Includes an annotation Import link if warning group sharing is ON.
Native Compilation Details Log CodeSecure diagnostic output is provided if the VERBOSITY setting is 6 or higher.
Project New features:
Warning Search Results

New features:

  • Always includes an annotation Export link.
  • For queries referring to two or more Analysis IDs, the result table will include an Analysis Check column for every Analysis ID specified.

    Each Analysis Check column corresponds to a specific analysis.

    • The column is labeled with the analysis name.
    • The table entry for a warning instance belonging to warning group G will have a checkmark in this column if and only if the analysis issued at least one warning instance in group G.
      • In the XML and CSV versions of the page, the checkmark is replaced by the Instance ID of a warning instance that belongs to group G and was issued by the analysis.
    • Available Analysis Check columns are displayed by default.

Warning Search Language

The warning search language now includes set operators UNION, INTERSECT, and DIFFERENCE.

Analysis Comparison

Analysis pages in the Web GUI provide up to three shortcut links for comparing the sets of warnings issued by two or more analyses. Each comparison is carried out by executing a search of the form

aid= A1 UNION aid= A2 UNION ... UNION aid= An

for Analysis IDs A1..An.

Analysis comparison results are displayed in a Warning Search Results page with the following properties.

For full details, see GUI Reference: Analysis.

Advanced Search

The operator applied when multiple terms are entered for a single condition is now always OR.

There is one exception: behavior for the field labeled "where the warning report contains..." is controlled by the "[all of | the exact phrase | at least one of]" menu provided.

This represents a change in behavior for the following fields.

Configuration Parameter Changes

New Configuration Parameters

The following new configuration parameters have been introduced.

Parameter Relevant To
SOURCE_PATCH_DIRECTORIES source file patching
ANALYSIS_SLAVES parallel analysis
MAX_ANALYSIS_SLAVES parallel analysis
DAEMON_SLAVES parallel analysis
MAX_DAEMON_SLAVES parallel analysis
UNIT_OF_WORK_RETRIES parallel analysis
MASTER_LISTEN_INTERFACE parallel analysis
EXPLORE_MORE_LOOP_PATHS analysis
DATA_RACE_IGNORE_NAMES concurrency checking
FORCE_THREAD_ENTRY_NAMES concurrency checking
LOCK_MAX_PENDING_WARNINGS_PER_PROCEDURE concurrency checking
INFER_CONST analysis
REFINE_LEAKS_THOROUGHLY analysis
VISUALIZATION visualization
ASSUME_UNDEFINED_PARAMETERS_MAYBE_FREED
ASSUME_UNDEFINED_PARAMETERS_MAYBE_INITIALIZED
ASSUME_UNDEFINED_PARAMETERS_MAYBE_MODIFIED
ASSUME_FUNCPTR_PARAMETERS_MAYBE_FREED
ASSUME_FUNCPTR_PARAMETERS_MAYBE_INITIALIZED
ASSUME_FUNCPTR_PARAMETERS_MAYBE_MODIFIED
ASSUME_VARARG_PARAMETERS_MAYBE_FREED
ASSUME_VARARG_PARAMETERS_MAYBE_INITIALIZED
ASSUME_VARARG_PARAMETERS_MAYBE_MODIFIED
ASSUME_OTHER_PARAMETERS_MAYBE_FREED
ASSUME_OTHER_PARAMETERS_MAYBE_INITIALIZED
ASSUME_OTHER_PARAMETERS_MAYBE_MODIFIED
analysis

Deleted Configuration Parameters

The following configuration parameters are no longer supported.

API Changes

Extension API

New prototypes allow users to write custom models to indicate blocking functions and data race exclusion.

AST changes

Unnormalized C/C++ AST Class Field Changes

The following classes have undergone field changes.

Other Analysis Improvements

General improvements to the CodeSonar analysis engine.

Miscellaneous

Customer Tickets Fixed

An asterisk [*] next to the ticket number denotes a modification to content in the CodeSonar manual; click to navigate to the corresponding manual location.

2231 Bug reports may be hard to read if colorblind
6355 Hub exception: AttributeError: 'DeferredColumnLoader' object has no attribute 'group'
7074 Update compiler model for IAR icc430
7154 Change multiple warnings emails every user on the hub
7181 FN: buffover in infinite loop
7618 [*] Add troubleshooting tip for error "libhookcs.so' from LD_PRELOAD cannot be preloaded"
7691 Manually test various compilers for customers
7748 Advise users of the port@server option for LM_LICENSE_FILE
8093 FP: Wrong pointer from dynamic_cast with nested classes
8153 FP: leak b/c of missing destructor call
8354 FP: buffover from sscanf
8467 Analysis fails to find project files if partial path with subfolder is specified
8844 [EDGcpfe/12671][EDGcpfe/11293]Parse error: class template "umap<keyT, valT>" has no member "begin"
8847 Can't change mode on store.xref
8946 FP: NPD in class constructor when operator new returns null
8968 FN: leak not detected if other member variable is initialized
9077 Metrics associates wrong file with procedure when declared as friend function
9079 FN: leak with infinite loop
9165 Incorrect prototype for _snprintf_s
9344 [*] Hub must be run from a local disk.