If ptr
was allocated with an alignment returned from aligned_alloc()
and realloc()
reallocates memory with a different alignment, the behavior is undefined.
This rule only applies to compilers that conform to the (emerging) C1X standard \[ [Jones 2009|AA. Bibliography#Jones 09]\]. Wiki Markup
Noncompliant Code Example
...
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
MSC36-C | high | probable | medium | P12 | L1 |
Bibliography
\[[Jones 2009|AA. Bibliography#Jones 09] \] Section 7.21.3
\ Wiki Markup
[[aligned_alloc()|http://www.open-std.org/Jtc1/sc22/wg14/www/docs/n1397.htm] \] 7.20.3.5
...
MSC35-C. Do not include any executable statements inside a switch statement before the first case label 49. Miscellaneous (MSC)