Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Parasoft C/C++test 2023.1

...

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
integer-overflowFully checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-INT08
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

ALLOC.SIZE.ADDOFLOW

ALLOC.SIZE.IOFLOW

ALLOC.SIZE.MULOFLOW

ALLOC.SIZE.SUBUFLOW

MISC.MEM.SIZE.ADDOFLOW

MISC.MEM.SIZE.BAD

MISC.MEM.SIZE.MULOFLOW

MISC.MEM.SIZE.SUBUFLOW

Addition Overflow of Allocation Size

Integer Overflow of Allocation Size

Multiplication Overflow of Allocation Size

Subtraction Underflow of Allocation Size

Addition Overflow of Size

Unreasonable Size Argument

Multiplication Overflow of Size

Subtraction Underflow of Size

Compass/ROSE



Could detect violations of this recommendation by flagging any comparison expression involving addition that could potentially overflow. For example, instead of comparing a + b < c (where b and c are compile-time constants) and b > c, the code should compare a < c - b. (This assumes a, b, c are unsigned ints. Usually b is small and c is an upper bound such as INT_MAX.)

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C2800,  C2910

DF2801, DF2802, DF2803, DF2911, DF2912, DF2913


LDRA tool suite
Include Page
LDRA_V
LDRA_V

488 S, 493 S, 493 S

Partially implemented

Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_C-INT08-a
CERT_C-INT08-b
CERT_C-INT08-c
CERT_C-INT08-d

Avoid data loss when converting between integer types
Avoid signed integer overflows
Avoid value change when converting between integer types
Avoid wraparounds when performing arithmetic integer operations

PC-lint Plus

Include Page
PC-lint Plus_V
PC-lint Plus_V

648, 650, 679, 680, 776,
952, 2704

Partially supported

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rec. INT08-CChecks for integer overflow or integer constant overflow (rec. fully covered)


...