let contains_zero loc =
try
let is_valid_offset base offset =
match base with
Base.Null ->
if Ival.contains_zero offset then raise Base.Not_valid_offset
| _ ->
let bits_offset = Ival.scale (Bit_utils.sizeofchar()) offset in
Base.is_valid_offset Int.zero base bits_offset
in
match loc with
| Location_Bytes.Top _ -> true
| Location_Bytes.Map m ->
Location_Bytes.M.iter is_valid_offset m;
false
with
| Int_Base.Error_Top | Int_Base.Error_Bottom
| Base.Not_valid_offset -> true