Skip to content

Commit b577ec1

Browse files
committed
Fix IntervalDomain.top_of Z.Overflow for 63-bit bitfields
1 parent ef7039a commit b577ec1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cdomain/value/cdomains/int/intervalDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ struct
1111

1212
let top_of ?bitfield ik =
1313
match bitfield with
14-
| Some b when b <= Ints_t.to_int (range ik |> snd) ->
14+
| Some b when b <= Z.numbits (Size.range ik |> snd) ->
1515
let signed_lower_bound = Ints_t.neg @@ Ints_t.shift_left Ints_t.one (b - 1) in
1616
let unsigned_upper_bound = Ints_t.sub (Ints_t.shift_left Ints_t.one b) Ints_t.one in
1717
if GoblintCil.isSigned ik then

0 commit comments

Comments
 (0)