Skip to content

Commit c4d96e8

Browse files
committed
Assert that the set of lvals is not empty when written to
1 parent 87a979a commit c4d96e8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/analyses/base.ml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,11 +1737,9 @@ struct
17371737
| NullPtr
17381738
| UnknownPtr
17391739
| StrPtr _ -> store
1740-
in
1741-
if AD.is_empty lval then
1742-
st
1743-
else
1744-
AD.fold (fun addr acc -> D.join (update_one addr st) acc) lval (D.bot ())
1740+
in
1741+
assert (not @@ AD.is_empty lval);
1742+
AD.fold (fun addr acc -> D.join (update_one addr st) acc) lval (D.bot ())
17451743

17461744
let set_many ~ctx (st: store) lval_value_list: store =
17471745
(* Maybe this can be done with a simple fold *)

0 commit comments

Comments
 (0)