...
The effects of passing objects of nonstandard-layout type across execution boundaries depends on what operations are performed on the object within the callee as well as what subsequent operations are performed on the object from the caller. The effects can range from correct or benign behavior to undefined behavior.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
EXP60-CPP | High | Probable | Medium | P12 | L1 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
| -Wdynamic-class-memaccess | Catches instances where the vtable pointer will be overwritten | |||||||
Helix QAC |
| DF4741, DF4742, DF4743 | |||||||
Klocwork |
| CERT.EXPR.PASS_NON_STD_LAYOUT | |||||||
Parasoft C/C++test |
| CERT_CPP-EXP60-a | Do not pass a nonstandard-layout type object across execution boundaries | ||||||
Polyspace Bug Finder |
| CERT C++: EXP60-CPP | Checks for non-standard layout objects passed across execution boundaries (rule fully covered). |
Related Vulnerabilities
Search for other vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
Bibliography
...