Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update CodeSonar mapping info

...

Exception handlers with inverted priorities cause unexpected control flow when an exception of the derived type occurs.

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

ERR54-CPP

Medium

Likely

Yes

LowYes

P18

L1

Automated Detection

4030, 4639

Tool

Version

Checker

Description

Astrée

Include Page
Astrée_V
Astrée_V

exception-caught-by-earlier-handler
Fully checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC++-ERR54
Clang
Include Page
Clang_V
Clang_V
-Wexceptions
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

LANG.STRUCT.UCTCH

Masked by handler

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CP1.ERR36

Fully implemented

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C++4030, C++4639
Klocwork
Include Page
Klocwork_V
Klocwork_V
MISRA.CATCH.NOALL
MISRA.CATCH.WRONGORD 

LDRA tool suite
Include Page
LDRA_V
LDRA_V

541 S, 556 S

Fully implemented

Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V
EXCEPT-17CERT_CPP-ERR54-a

Where multiple handlers are provided in a single try-catch statement or function-try-block for a derived class and some or all of its bases, the handlers shall be ordered most-derived to base class

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C++: ERR54-CPP

Checks for:

  • Exception handlers not ordered from most-derived to base class
  • Incorrect order of ellipsis handler

Rule fully covered.

PRQA QA-C++
Include Page
PRQA QA-C++_VPRQA QA-C++_V
PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V759
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
exception-caught-by-earlier-handler
Fully checked
SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
S1045

Related Vulnerabilities

Search for other vulnerabilities resulting from the violation of this rule on the CERT website.

...