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/apron/relationAnalysis.apron.ml
+4-39Lines changed: 4 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -174,39 +174,12 @@ struct
174
174
(** An extended overflow handling inside relationAnalysis for expression assignments when overflows are assumed to occur.
175
175
Since affine equalities can only keep track of integer bounds of expressions evaluating to definite constants, we now query the integer bounds information for expressions from other analysis.
176
176
If an analysis returns bounds that are unequal to min and max of ikind , we can exclude the possibility that an overflow occurs and the abstract effect of the expression assignment can be used, i.e. we do not have to set the variable's value to top. *)
RD.remove_vars_with new_fun_rel arg_vars; (* fine to remove arg vars that also exist in caller because unify from new_rel adds them back with proper constraints *)
let tainted_vars =TaintPartialContexts.conv_varset tainted in
618
-
ifM.tracing thenM.trace "combine""";
619
590
let new_rel =RD.keep_filter st.rel (funvar ->
620
591
matchRV.find_metadata var with
621
592
|Some (Local _) whennot (pass_to_callee fundec any_local_reachable var) -> true(* keep caller locals, provided they were not passed to the function *)
622
593
|Some (Arg _) -> true(* keep caller args *)
623
594
|Some (Localv) whenAllocSize.mem_varinfo v ||PointerMap.mem_varinfo v ||ArrayMap.mem_varinfo v -> true(* keep ghost Variables already filtered out in return *)
true(* keep locals and globals, which have not been touched by the call *)
630
-
|v ->
631
-
ifM.tracing thenM.trace "combine""remove else %s\n" (match v with|None -> "none"|Somev -> (VM.var_name) v );
632
-
false(* remove everything else (globals, global privs, reachable things from the caller) *)
595
+
|Some ((Local_ | Global_)) whennot (RD.mem_var new_fun_rel var) -> false(* remove locals and globals, for which no record exists in the new_fun_apr *)
596
+
|Some ((Localv | Globalv)) whennot (TaintPartialContexts.VS.mem v tainted_vars) -> true(* keep locals and globals, which have not been touched by the call *)
597
+
|v -> false(* remove everything else (globals, global privs, reachable things from the caller) *)
633
598
)
634
599
in
635
600
let unify_rel =RD.unify new_rel new_fun_rel in(* TODO: unify_with *)
0 commit comments