...
If an exception occurs while a mutex is locked, deadlock may result.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
CON51-CPP | Low | Probable | Low | P6 | L2 |
Automated Detection
Tool | Version | Checker | Description |
---|
CodeSonar |
| CONCURRENCY.LOCK.NOUNLOCK | Missing Lock Release | ||||||
Helix QAC |
| C++5018 | |||||||
Parasoft C/C++test |
| CERT_CPP-CON51-a | Do not call lock() directly on a mutex | ||||||
Polyspace Bug Finder |
| CERT C++: CON51-CPP | Checks for lock possibly not released on exception (rule fully covered) |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...
This rule is a subset of ERR56-CPP. Guarantee exception safety.
MITRE CWE | CWE-667, Improper Locking |
SEI CERT Oracle Coding Standard for Java | LCK08-J. Ensure actively held locks are released on exceptional conditions |
Bibliography
[ISO/IEC 14882-2014] | Subclause 30.4.2, "Locks" |
...
...