You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/analyses/basePriv.ml
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -834,12 +834,14 @@ struct
834
834
ifLockDomain.MustLockset.is_all locks then
835
835
Invariant.none
836
836
else (
837
-
letread_globalg= getg g in(* TODO: read top for others? or at least those which might not have all same protecting locks? *)
837
+
(* Only read g as protected, everything else (e.g. pointed to variables) may be unprotected.
838
+
See 56-witness/69-ghost-ptr-protection and https://github.com/goblint/analyzer/pull/1394#discussion_r1698136411. *)
839
+
letread_globalg'=ifCilType.Varinfo.equal g' g then getg g' elseVD.top ()in(* TODO: Could be more precise for at least those which might not have all same protecting locks? *)
838
840
let inv =ValueDomain.invariant_global read_global g in
839
841
(* Very conservative about multiple protecting mutexes: invariant is not claimed when any of them is held.
840
-
It should be possible to be more precise because writes only happen with all of them held,
841
-
but conjunction is unsound when one of the mutexes is temporarily unlocked.
842
-
Hypothetical read-protection is also somehow relevant. *)
842
+
It should be possible to be more precise because writes only happen with all of them held,
843
+
but conjunction is unsound when one of the mutexes is temporarily unlocked.
844
+
Hypothetical read-protection is also somehow relevant. *)
843
845
LockDomain.MustLockset.fold (funmacc ->
844
846
ifLockDomain.MustLock.equal m (LockDomain.MustLock.of_var LibraryFunctions.verifier_atomic_var) then
0 commit comments