Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'VNA03-J Sequence of calls on a synchronized abstraction may not be atomic' detector with test cases #2919

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PatrikScully
Copy link
Contributor

Individually, the methods of synchronized abstraction are atomic. However, when called in succession, there is no guarantee that the combined operation is atomic, so a method could contain a race condition that allows one thread to modify a collection and a second thread to race in and modify the collection before the first thread completes.

See https://wiki.sei.cmu.edu/confluence/display/java/VNA03-J.+Do+not+assume+that+a+group+of+calls+to+independently+atomic+methods+is+atomic

@PatrikScully
Copy link
Contributor Author

We run the checkers on some big projects, here are the results:

@hazendaz hazendaz added this to the SpotBugs 5.0.0 milestone Apr 12, 2024
@hazendaz
Copy link
Member

Due to size of this effort and fact we have had some missteps with false positives on releases, deferring this to 5.0.0. We need to get a proper stable 4.8.x before we move forwards with new features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants