Skip to content

Commit c7199a0

Browse files
committed
Do not remove NullPtr-s from address sets
1 parent c4d96e8 commit c7199a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/analyses/base.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,9 @@ struct
540540
if not (VD.is_immediate_type t) then M.info ~category:Unsound "Unknown value in %s could be an escaped pointer address!" description; empty
541541
| Bot -> (*M.debug ~category:Analyzer "A bottom value when computing reachable addresses!";*) empty
542542
| Address adrs when AD.is_top adrs ->
543-
M.info ~category:Unsound "Unknown address in %s has escaped." description; AD.remove Addr.NullPtr adrs (* return known addresses still to be a bit more sane (but still unsound) *)
543+
M.info ~category:Unsound "Unknown address in %s has escaped." description; adrs (* return known addresses still to be a bit more sane (but still unsound) *)
544544
(* The main thing is to track where pointers go: *)
545-
| Address adrs -> AD.remove Addr.NullPtr adrs
545+
| Address adrs -> adrs
546546
(* Unions are easy, I just ingore the type info. *)
547547
| Union (f,e) -> reachable_from_value ask e t description
548548
(* For arrays, we ask to read from an unknown index, this will cause it
@@ -2029,7 +2029,7 @@ struct
20292029
collect_funargs ~ctx ~warn st exps
20302030
else (
20312031
let mpt e = match eval_rv_address ~ctx st e with
2032-
| Address a -> AD.remove NullPtr a
2032+
| Address a -> a
20332033
| _ -> AD.empty ()
20342034
in
20352035
List.map mpt exps

0 commit comments

Comments
 (0)