...
Failure to synchronize access to shared mutable data can cause different threads to observe different states of the object or to observe a partially initialized object.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
TSM03-J | Medium | Probable | Yes | MediumNo | P8 | L2 |
Automated Detection
| Tool | Version | Checker | Description | CodeSonar | |||||
|---|---|---|---|---|---|---|---|---|---|
| Include Page | CodeSonar_V | CodeSonar_V | FB.MT_CORRECTNESS.DC_PARTIALLY_CONSTRUCTED | Possible exposure of partially initialized object
Bibliography
[API 2006] | |
Item 48, "Synchronize Access to Shared Mutable Data" | |
Section 3.5.3, "Safe Publication Idioms" | |
Pattern #2, "One-Time Safe Publication" | |
[JPL 2006] | Section 14.10.2, "Final Fields and Security" |
...