Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Using improperly aligned pointers results in undefined behavior, typically leading to abnormal termination.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

MEM57-CPP

Medium

Unlikely

Low

P6

L2

Automated Detection

Tool

Version

Checker

Description

   
Astrée

Include Page
Astrée_V
Astrée_V

default-new-overaligned-type
Fully checked
Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C++3129
Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_CPP-MEM57-a

Avoid using the default operator 'new' for over-aligned types
Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C++: MEM57-CPPChecks for situations where operator new is not overloaded for possibly overaligned types (rule fully covered)
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
default-new-overaligned-type
Fully checked
 

Related Vulnerabilities

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

Related Guidelines

Bibliography

[ISO/IEC 14882-2014]

Subclause 3.7.4, "Dynamic Storage Duration"
Subclause 5.3.4, "New"
Subclause 18.6.1, "Storage Allocation and Deallocation"

[CodeSourcery 2016a]Itanium C++ ABI, version 1.86
[INCITS 2012]Dynamic memory allocation for over-aligned data, WG14 proposal

...


...