fixing angelic in case where unknown function is called indirectly

Reviewed By: jeremydubreil

Differential Revision: D2644645

fb-gh-sync-id: 65f67e8
master
Sam Blackshear 9 years ago committed by facebook-github-bot-1
parent f2ba1b1c76
commit db7dd5aebe

@ -1135,6 +1135,7 @@ and add_constraints_on_retval pdesc prop exp typ callee_pname callee_loc =
IList.fold_left bind_exp prop (Prop.get_sigma prop) in
(* bind return id to the abducted value pointed to by the pvar we introduced *)
bind_exp_to_abducted_val exp abducted_ret_pv prop
|> add_ret_non_null exp typ
else add_ret_non_null exp typ prop
and add_constraints_on_actuals_by_ref prop actuals_by_ref callee_pname callee_loc =

@ -435,5 +435,21 @@ public class NullPointerExceptions {
File[] files = dir.listFiles();
return files.length; // expect possible NullPointerException as files == null is possible
}
native Object unknownFunc();
Object callUnknownFunc() {
return unknownFunc();
}
void dontReportOnNullableDirectReassignmentToUnknown(@Nullable Object o) {
o = unknownFunc();
o.toString();
}
void dontReportOnNullableIndirectReassignmentToUnknown(@Nullable Object o) {
o = callUnknownFunc();
o.toString();
}
}

Loading…
Cancel
Save