@@ -928,7 +928,7 @@ struct
928928 (* | Lval (Mem e, ofs) -> get ~man st (eval_lv ~man (Mem e, ofs)) *)
929929 | (Mem e , ofs ) ->
930930 (* if M.tracing then M.tracel "cast" "Deref: lval: %a" d_plainlval lv;*)
931- let rec contains_vla (t :typ ) = match t with (* TODO: unrolltype? *)
931+ let rec contains_vla (t :typ ) = match Cil. unrollType t with
932932 | TPtr (t , _ ) -> contains_vla t
933933 | TArray (t , None, args ) -> true
934934 | TArray (t , Some exp , args ) when isConstant exp -> contains_vla t
@@ -1452,7 +1452,8 @@ struct
14521452 match eval_rv_address ~man man.local e with
14531453 | Address a ->
14541454 let slen = Seq. map String. length (List. to_seq (AD. to_string a)) in
1455- let lenOf = function (* TODO: unrolltype? *)
1455+ let lenOf t =
1456+ match Cil. unrollType t with
14561457 | TArray (_ , l , _ ) -> (try Some (lenOfArray l) with LenOfArray -> None )
14571458 | _ -> None
14581459 in
@@ -2285,7 +2286,7 @@ struct
22852286 ) a
22862287 | _ -> false
22872288
2288- let get_size_of_ptr_target man ptr =
2289+ let get_size_of_ptr_target man ptr = (* TODO: deduplicate with memOutOfBounds *)
22892290 let intdom_of_int x =
22902291 ID. of_int (Cilfacade. ptrdiff_ikind () ) (Z. of_int x)
22912292 in
@@ -2302,7 +2303,7 @@ struct
23022303 let pts_elems_to_sizes (addr : Queries.AD.elt ) =
23032304 begin match addr with
23042305 | Addr (v , _ ) ->
2305- begin match v.vtype with (* TODO: unrolltype? *)
2306+ begin match Cil. unrollType v.vtype with
23062307 | TArray (item_typ , _ , _ ) ->
23072308 let item_typ_size_in_bytes = size_of_type_in_bytes item_typ in
23082309 begin match man.ask (Queries. EvalLength ptr) with
0 commit comments