Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added Polyspace Bug Finder

...

If expressions that appear to produce side effects are supplied to an operator that does not evaluate its operands, the results may be different than expected. Depending on how this result is used, it can lead to unintended program behavior.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

EXP44-C

Low

Unlikely

Low

P3

L3

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V

sizeof

Partially checked
Clang
Include Page
Clang_V
Clang_V
-Wunevaluated-expressionCan diagnose some instance of this rule, but not all (such as the _Alignof NCCE).
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
LANG.STRUCT.SE.SIZEOFSide effects in sizeof
Compass/ROSE

 

 

 




Coverity
Include Page
Coverity_V
Coverity_V

MISRA C 2004 Rule 12.3

Partially implemented

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.EXP06

Fully implemented

Klocwork
Include Page
Klocwork_V
Klocwork_V
MISRA.SIZEOF.SIDE_EFFECT
 

LDRA tool suite
Include Page
LDRA_V
LDRA_V

54 S, 653 S

Fully implemented

Parasoft C/C++test
Include Page
c:
Parasoft_V
c:
Parasoft_V
JSF-166{b,c}Fully implemented

Polyspace Bug Finder

R2018aSide effect of expression ignoredsizeof, _Alignof, or _Generic operates on expression with side effect
PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v
3307Fully implemented
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
sizeofPartially checked

Related Vulnerabilities

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

...

Key here (explains table format and definitions)

Taxonomy

Taxonomy item

Relationship

CERT CEXP52-CPP. Do not rely on side effects in unevaluated operandsPrior to 2018-01-12: CERT: Unspecified Relationship

 


...