From 8ae117253f84b9b419d52a318af06dc7e4518475 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Wed, 22 Nov 2023 11:53:08 +0100 Subject: [PATCH] Revert spurious changes to `base.ml` --- src/analyses/base.ml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/analyses/base.ml b/src/analyses/base.ml index 518d4d88c6..84be8c7a19 100644 --- a/src/analyses/base.ml +++ b/src/analyses/base.ml @@ -1056,13 +1056,7 @@ struct ); (* Warn if any of the addresses contains a non-local and non-global variable *) if AD.exists (function - | AD.Addr.Addr (v, _) -> - (M.tracel "wtf" "checking for %a\n" CilType.Varinfo.pretty v; - if v.vglob then - (* this is OK *) - false - else - (not (CPA.mem v st.cpa)) || WeakUpdates.mem v st.weak) + | AD.Addr.Addr (v, _) -> not (CPA.mem v st.cpa) && not (is_global a v) | _ -> false ) adr then ( AnalysisStateUtil.set_mem_safety_flag InvalidDeref;