Fix pre-analysis crash in master.

Reviewed By: dulmarod, sblackshear, jberdine

Differential Revision: D2971577

fb-gh-sync-id: adc30d2
shipit-source-id: adc30d2
master
Cristiano Calcagno 9 years ago committed by facebook-github-bot-7
parent 06f40efab8
commit ccd760b239

@ -387,7 +387,11 @@ let add_dispatch_calls cfg cg tenv f_translate_typ_opt =
when call_flags_is_dispatch call_flags -> when call_flags_is_dispatch call_flags ->
(* the frontend should not populate the list of targets *) (* the frontend should not populate the list of targets *)
assert (call_flags.Sil.cf_targets = []); assert (call_flags.Sil.cf_targets = []);
let receiver_typ_no_ptr = Sil.typ_strip_ptr receiver_typ in let receiver_typ_no_ptr = match receiver_typ with
| Sil.Tptr (typ', _) ->
typ'
| _ ->
receiver_typ in
let sorted_overrides = let sorted_overrides =
let overrides = Prover.get_overrides_of tenv receiver_typ_no_ptr callee_pname in let overrides = Prover.get_overrides_of tenv receiver_typ_no_ptr callee_pname in
IList.sort (fun (_, p1) (_, p2) -> Procname.compare p1 p2) overrides in IList.sort (fun (_, p1) (_, p2) -> Procname.compare p1 p2) overrides in

Loading…
Cancel
Save