...
Failing to properly construct or destroy an object leaves its internal state inconsistent, which can result in undefined behavior and accidental information exposure.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
MEM53-CPP | High | Likely | Medium | P18 | L1 |
Automated Detection
Tool | Version | Checker | Description |
---|
Helix QAC |
| DF4761, DF4762, DF4766, DF4767 | |||||||
Parasoft C/C++test |
| CERT_CPP-MEM53-a | Do not invoke malloc/realloc for objects having constructors | ||||||
Polyspace Bug Finder |
| CERT C++: MEM53-CPP | Checks for objects allocated but not initialized (rule fully covered). | ||||||
PVS-Studio |
| V630, V749 |
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.8, "Object Lifetime" Clause 9, "Classes" |
...
...