Skip to content

Commit 92fb7f5

Browse files
committed
Java: Fix bad magic in SynchSetUnsynchGet.
1 parent e9b1146 commit 92fb7f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ predicate isSynchronizedByBlock(Method m) {
3535
* In this case, even if `set` is synchronized and `get` is not, `get` will never see stale
3636
* values for the field, so synchronization is optional.
3737
*/
38+
pragma[nomagic]
3839
predicate bothAccessVolatileField(Method set, Method get) {
3940
exists(Field f | f.isVolatile() |
4041
f = get.(GetterMethod).getField() and

0 commit comments

Comments
 (0)