...
Using incorrect forms of the double-checked locking idiom can lead to synchronization problems and can expose partially initialized objects.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
LCK10-J | Low | Probable | Yes | NoMedium | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CodeSonar |
| JAVA.CONCURRENCY.LOCK.DCL | Double-Checked Locking (Java) | ||||||
| Coverity | 7.5 | DOUBLE_CHECK_LOCK | Implemented | ||||||
| Klocwork |
| JD.SYNC.DCL | |||||||
| Parasoft Jtest |
| CERT.LCK10.DCL | Avoid unsafe implementations of the "double-checked locking" pattern | ||||||
| PVS-Studio |
| V5304, V6082 | |||||||
| SonarQube |
| S2168 |
...