...
Allowing a copy assignment operator to corrupt an object could lead to undefined behavior.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
OOP54-CPP | Low | Probable | Yes | HighNo | P2P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| dangling_pointer_use | ||||||||||||
| Clang | 9.0 (r361550) | cert-oop54-cpp | Checked by clang-tidy. | |||||||||||
| CodeSonar |
| IO.DC | Double Close | |||||||||||
| Helix QAC |
| C++4072, C++4073, C++4075, C++4076 | ||||||||||||
| Klocwork |
| CL.SELF-ASSIGN | ||||||||||||
| Parasoft C/C++test |
| CERT_CPP-OOP54-a | Check for assignment to self in operator=User-provided copy assignment operators shall handle self-assignment | |||||||||||
| Polyspace Bug Finder |
| CERT C++: OOP54-CPP | Checks for copy assignment operators where self-assignment is not tested (rule partially covered) | PRQA QA-C++ | | Include Page | | PRQA QA-C++_V | PRQA QA-C++_V | 4072, 4073, 4075, 4076
Related Vulnerabilities
Search for other vulnerabilities resulting from the violation of this rule on the CERT website.
...