...
Failure to ensure the atomicity of two or more operations that must be performed as a single atomic operation can result in race conditions in multithreaded applications.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
VNA03-J | Low | Probable | No | NoMedium | P4P2 | L3 |
Automated Detection
Some static analysis tools are capable of detecting violations of this rule.
| Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CodeSonar |
| JAVA.CONCURRENCY.VOLATILE | Useless volatile Modifier (Java) | ||||||
| Coverity | 7.5 | ATOMICITY | Implemented | ||||||
| Parasoft Jtest |
| CERT.VNA03.SSUG CERT.VNA03.MRAV | Make the get method for a field synchronized if the set method is synchronized Access related Atomic variables in a synchronized block | ||||||
| ThreadSafe |
| CCE_CC_NON_ATOMIC_GCP | Implemented |
Related Guidelines
...