Versions Compared

Key

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

...

Comparing padding bytes, when present, can lead to unexpected program behavior.

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

EXP42-C

Medium

Probable

Yes

YesMedium

P8P12

L2L1

Automated Detection

Tool

Version

Checker

Description

Astrée

Include Page
Astrée_V
Astrée_V

memcpy-with-paddingPartially checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-EXP42
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

BADFUNC.MEMCMP

Use of memcmp

Cppcheck Premium

Include Page
Cppcheck Premium_V
Cppcheck Premium_V

premium-cert-exp42-c
Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

DF4726, DF4727, DF4728, DF4729


Klocwork

Include Page
Klocwork_V
Klocwork_V

MISRA.STDLIB.MEMCMP.PTR_ARG_TYPES
LDRA tool suite
Include Page
LDRA_V
LDRA_V
618 SPartially implemented
Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V
CERT_C-EXP42-a

Don't memcpy or memcmp non-PODs

PC-lint Plus

Include Page
PC-lint Plus_V
PC-lint Plus_V

958, 959

Assistance provided: reports structures which require padding between members or after the last member

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rule EXP42-C


Checks for memory comparison of padding data (rule fully covered)

PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V1103
RuleChecker

Include Page
RuleChecker_V
RuleChecker_V

memcpy-with-paddingPartially checked
TrustInSoft Analyzer

Include Page
TrustInSoft Analyzer_V
TrustInSoft Analyzer_V

comparable_char_blocks

Exhaustively verified (see the compliant and the non-compliant example).

...