Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM Cost Reform

...

Guarantee

Description

Example

Strong

The strong exception safety guarantee is a property of an operation such that, in addition to satisfying the basic exception safety guarantee, if the operation terminates by raising an exception, it has no observable effects on program state.

Strong Exception Safety

Basic

The basic exception safety guarantee is a property of an operation such that, if the operation terminates by raising an exception, it preserves program state invariants and prevents resource leaks.

Basic Exception Safety

None

Code that provides neither the strong nor basic exception safety guarantee is not exception safe.

No Exception Safety

...

Code that is not exception safe typically leads to resource leaks, causes the program to be left in an inconsistent or unexpected state, and ultimately results in undefined behavior at some point after the first exception is thrown.

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

ERR56-CPP

High

Likely

No

NoHigh

P9

L2

Automated Detection

Tool

Version

Checker

Description

CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

ALLOC.LEAK

Leak

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C++4075, C++4076
LDRA tool suite
Include Page
LDRA_V
LDRA_V

527 S, 56 D, 71 D

Partially implemented

Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V

CERT_CPP-ERR56-a
CERT_CPP-ERR56-b

Always catch exceptions
Do not leave Empty 'catch' blocks emptyshould not be used
Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C++: ERR56-CPPChecks for exceptions violating class invariant (rule fully covered).
PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V565V1023, V5002

...