|
|
@ -354,7 +354,6 @@ module AddressAttributes = struct
|
|
|
|
(astate.post :> BaseDomain.t).attrs
|
|
|
|
(astate.post :> BaseDomain.t).attrs
|
|
|
|
with
|
|
|
|
with
|
|
|
|
| None ->
|
|
|
|
| None ->
|
|
|
|
let is_eq_null = PathCondition.is_known_zero astate.path_condition addr in
|
|
|
|
|
|
|
|
let null_astates =
|
|
|
|
let null_astates =
|
|
|
|
if PathCondition.is_known_not_equal_zero astate.path_condition addr then []
|
|
|
|
if PathCondition.is_known_not_equal_zero astate.path_condition addr then []
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -365,20 +364,23 @@ module AddressAttributes = struct
|
|
|
|
let null_astate = abduce_attribute addr null_attr null_astate in
|
|
|
|
let null_astate = abduce_attribute addr null_attr null_astate in
|
|
|
|
if null_noop then [Ok null_astate] else [Error (`ISLError null_astate)]
|
|
|
|
if null_noop then [Ok null_astate] else [Error (`ISLError null_astate)]
|
|
|
|
in
|
|
|
|
in
|
|
|
|
if is_eq_null then null_astates
|
|
|
|
let not_null_astates =
|
|
|
|
else
|
|
|
|
if PathCondition.is_known_zero astate.path_condition addr then []
|
|
|
|
let valid_astate =
|
|
|
|
else
|
|
|
|
let abdalloc = Attribute.ISLAbduced access_trace in
|
|
|
|
let valid_astate =
|
|
|
|
let valid_attr = Attribute.MustBeValid access_trace in
|
|
|
|
let abdalloc = Attribute.ISLAbduced access_trace in
|
|
|
|
add_one addr abdalloc astate |> abduce_attribute addr valid_attr
|
|
|
|
let valid_attr = Attribute.MustBeValid access_trace in
|
|
|
|
|> abduce_attribute addr abdalloc
|
|
|
|
add_one addr abdalloc astate |> abduce_attribute addr valid_attr
|
|
|
|
in
|
|
|
|
|> abduce_attribute addr abdalloc
|
|
|
|
let invalid_free =
|
|
|
|
in
|
|
|
|
(*C or Cpp?*)
|
|
|
|
let invalid_free =
|
|
|
|
let invalid_attr = Attribute.Invalid (CFree, access_trace) in
|
|
|
|
(*C or Cpp?*)
|
|
|
|
abduce_attribute addr invalid_attr astate |> add_one addr invalid_attr
|
|
|
|
let invalid_attr = Attribute.Invalid (CFree, access_trace) in
|
|
|
|
in
|
|
|
|
abduce_attribute addr invalid_attr astate |> add_one addr invalid_attr
|
|
|
|
Ok valid_astate :: Error (`ISLError invalid_free) :: null_astates
|
|
|
|
in
|
|
|
|
|
|
|
|
[Ok valid_astate; Error (`ISLError invalid_free)]
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
not_null_astates @ null_astates
|
|
|
|
| Some _ ->
|
|
|
|
| Some _ ->
|
|
|
|
[Ok astate] )
|
|
|
|
[Ok astate] )
|
|
|
|
| Some (invalidation, invalidation_trace) ->
|
|
|
|
| Some (invalidation, invalidation_trace) ->
|
|
|
|