File tree Expand file tree Collapse file tree
src/cdomain/value/cdomains Expand file tree Collapse file tree Original file line number Diff line number Diff line change 834834let array_oob_check ( type a ) (module Idx: IntDomain.Z with type t = a ) (x , l ) (e , v ) =
835835 if GobConfig. get_bool " ana.arrayoob" then (* The purpose of the following 2 lines is to give the user extra info about the array oob *)
836836 let idx_before_end = Idx. to_bool (Idx. lt v l) (* check whether index is before the end of the array *)
837- and idx_after_start = Idx. to_bool (Idx. ge v (Idx. of_int Cil. ILong Z. zero)) in (* check whether the index is non-negative *)
837+ and idx_after_start = Idx. to_bool (Idx. ge v (Idx. of_int ( Cilfacade. ptrdiff_ikind () ) Z. zero)) in (* check whether the index is non-negative *)
838838 (* For an explanation of the warning types check the Pull Request #255 *)
839839 match (idx_after_start, idx_before_end) with
840840 | Some true , Some true -> (* Certainly in bounds on both sides.*)
You can’t perform that action at this time.
0 commit comments