Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Using incorrect forms of the double-checked locking idiom can lead to synchronization problems and can expose partially initialized objects.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

LCK10-J

Low

Probable

Medium

P4

L3

Automated Detection

Tool
Version
Checker
Description
CodeSonar
4.2FB.MT_CORRECTNESS.DC_DOUBLECHECKPossible double check of field

Include Page
CodeSonar_V
CodeSonar_V

JAVA.CONCURRENCY.LOCK.DCLDouble-Checked Locking (Java)
Coverity7.5

DOUBLE_CHECK_LOCK
FB.DC_DOUBLECHECK

Implemented
Parasoft Jtest
9.5TRS.DCLImplementedSonarQube Java Plugin
Include Page
Parasoft_V
Parasoft_V
CERT.LCK10.DCLAvoid unsafe implementations of the "double-checked locking" pattern
PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V5304, V6082
SonarQube
Include Page
SonarQube
Java Plugin
_V
SonarQube
Java Plugin
_V
S2276
S2168
 

Related Guidelines

MITRE CWE

CWE-609, Double-checked Locking

Bibliography

 



...

Image Modified Image Modified Image Modified