From 92fb7f555cd7d4b0ec832b7a783fc10f103c00a7 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 8 Nov 2021 11:42:20 +0100 Subject: [PATCH] Java: Fix bad magic in SynchSetUnsynchGet. --- java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql | 1 + 1 file changed, 1 insertion(+) diff --git a/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql b/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql index 3cee55f4833..f631ab145ed 100644 --- a/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql +++ b/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql @@ -35,6 +35,7 @@ predicate isSynchronizedByBlock(Method m) { * In this case, even if `set` is synchronized and `get` is not, `get` will never see stale * values for the field, so synchronization is optional. */ +pragma[nomagic] predicate bothAccessVolatileField(Method set, Method get) { exists(Field f | f.isVolatile() | f = get.(GetterMethod).getField() and