...
Destroying a mutex while it is locked may result in invalid control flow and data corruption.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
CON50-CPP | Medium | Probable | No | NoHigh | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CodeSonar |
| CONCURRENCY.LOCALARG | Local Variable Passed to Thread | ||||||
| Helix QAC |
| DF961, DF4962 | |||||||
| Klocwork |
| CERT.CONC.MUTEX.DESTROY_WHILE_LOCKED | |||||||
| Parasoft C/C++test |
| CERT_CPP-CON50-a | Do not destroy another thread's mutex | ||||||
| Polyspace Bug Finder |
| CERT C++: CON50-CPP | Checks for destruction of locked mutex (rule partially covered) |
...