Skip to content

Commit

Permalink
Add commented out possible fix to unsound var_eq invalidate
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Mar 1, 2022
1 parent d239760 commit 73cd135
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/analyses/varEq.ml
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,10 @@ struct
| None -> None
| Some st ->
let vs = ask.f (Queries.ReachableFrom e) in
Some (Queries.LS.join vs st)
if Queries.LS.is_top vs then
None
else
Some (Queries.LS.join vs st)
in
List.fold_right reachable es (Some (Queries.LS.empty ()))

Expand Down Expand Up @@ -496,6 +499,8 @@ struct
D.B.fold remove_reachable2 es st
in
D.fold remove_reachable1 ctx.local ctx.local
(* TODO: do something like this instead to be sound? *)
(* List.fold_left (fun st e -> remove_exp (Analyses.ask_of_ctx ctx) e st) ctx.local (Queries.LS.fold (fun lval acc -> mkAddrOf (Lval.CilLval.to_lval lval) :: acc) rs []) *)

let unknown_fn ctx lval f args =
let args =
Expand Down

0 comments on commit 73cd135

Please sign in to comment.