CodeSonar Release 3.6, patchlevel 0: Release Notes



Major New Features

The major changes in this release are all in support of enhanced result understandability.

Notes on Upgrading

Notes on Installing

The Installation manual section provides instructions for installing CodeSonar.

For Windows users without Administrator privileges, some additional steps are required. The simplest solution is to acquire these privileges, but if this is not possible then the additional steps are as follows. Note that non-Administrators are not able to create Windows services, so it will not be possible to run the CodeSonar hub or launch daemon as services.

  1. Make sure you specify an installation directory for which you have write permission. Your home directory is usually a suitable candidate; Program Files usually is not.
  2. If you want to run the CodeSonar build/analysis, an Administrator must install the device driver:
    hookcs.exe --uninstall --install
    This is not necessary if the installation is only being used to run a hub.

Other New Features

New Warning Class

There is one new warning class: High Risk Loop (disabled by default).

CWE Version

This version of CodeSonar uses CWE v1.8.1 (released April 5, 2010). Some warning class categories have been changed accordingly.

warning mnemonic new CWE IDs previous CWE IDs
ALLOC.DI 452, 675 452
ALLOC.RPF 465 none
BADFUNC.BO.STRCAT 120, 242, 251 120, 242
BADFUNC.BO.STRCATCHAINW 120, 242, 251 120, 242
BADFUNC.BO.STRCMP 120, 242, 251 120, 24
BADFUNC.BO.STRCPY 120, 242, 251 120, 24
BADFUNC.BO.STRLEN 120, 242, 251 120, 242
BADFUNC.BO.STRTRNS 120, 242, 251 120, 24
CONCURRENCY.DL 411, 764 411
CONCURRENCY.DU 411, 765 411
IO.DC 672, 675 672
IO.SOCK.STATE 666 none
LANG.CAST.FN 234,628,704 234,628
LANG.CAST.VALUE 172,704 172
LANG.CAST.VARARG 628,704 628
LANG.MEM.BO 120, 788 120, 121, 122, 126
LANG.MEM.BU 786 124, 127
LANG.STRUCT.NTAD 696 none
LANG.STRUCT.PBB 465 none
LANG.STRUCT.PPE 465 none
MISC.MEM.SU 789 none

Other Changes

Details

Changes To Plug-In API

The CodeSonar Plug-In API has undergone a number of changes to support adding understandability information. If you have developed plug-ins that you wish to continue using, you will need to update them accordingly.

Several functions now have an extra argument:

Modified Function Notes
Now have an additional cs_report_flags parameter
  • codesonar:report-point-warning
  • codesonar:report-location-warning
Now have an additional parameter that takes a list of POINT_FLAG.
  • codesonar:report-path-warning
The format required for the path parameter has changed. It is now a list of triples, where the third element of each triple is a list of PATH_FLAG (not a BOOLEAN).
  • codesonar:report-locations-warning
Now have an additional parameter that takes a list of LOCATIONS_FLAG.

Some C types have an additional field serving the same purpose:

Modified Type Notes
Now have new flags field

Step paths do not have understandability information associated with them. If you wish to add understandability information to a warning based on step path S, then do the following.

  1. Use csonar_step_path_to_list() to retrieve a cs_cfg_path_node_t* representation of S. Call this list L.
  2. For each cs_cfg_path_node_t in L, set the flags and problem fields with the understandability information you want to associate with that path point (if any).
  3. Report the warning with csonar_report_path_warning(), passing L as the warning_path parameter.

Scheme:

  1. Use codesonar:step-path->list to retrieve a list representation of S. Call this L.
  2. Augment every node of L so that it has the [path_point point_msg flags] format required for the path parameter of codesonar:report-path-warning, incorporating the messages and flags that you want to use. Call this augmented list P.
  3. Report the warning with codesonar:report-path-warning, passing P as the path parameter.

Changes to Extension API

The set of reserved Extension API attributes has changed.