From ccd760b2393ce159ac6c4771970c378f54e514a8 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Wed, 24 Feb 2016 08:15:52 -0800 Subject: [PATCH] Fix pre-analysis crash in master. Reviewed By: dulmarod, sblackshear, jberdine Differential Revision: D2971577 fb-gh-sync-id: adc30d2 shipit-source-id: adc30d2 --- infer/src/backend/preanal.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/infer/src/backend/preanal.ml b/infer/src/backend/preanal.ml index 27739c785..93da4c117 100644 --- a/infer/src/backend/preanal.ml +++ b/infer/src/backend/preanal.ml @@ -387,7 +387,11 @@ let add_dispatch_calls cfg cg tenv f_translate_typ_opt = when call_flags_is_dispatch call_flags -> (* the frontend should not populate the list of 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 overrides = Prover.get_overrides_of tenv receiver_typ_no_ptr callee_pname in IList.sort (fun (_, p1) (_, p2) -> Procname.compare p1 p2) overrides in