From 624cc5e536d86d307483237862f81ae3f54432a8 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Thu, 19 Oct 2017 08:22:10 -0700 Subject: [PATCH] [uninit] Do not crash if failed to compute post Reviewed By: sblackshear, martinoluca Differential Revision: D6099449 fbshipit-source-id: ce06294 --- infer/src/checkers/uninit.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infer/src/checkers/uninit.ml b/infer/src/checkers/uninit.ml index f498b4814..14d8cb9ac 100644 --- a/infer/src/checkers/uninit.ml +++ b/infer/src/checkers/uninit.ml @@ -255,5 +255,8 @@ let checker {Callbacks.tenv; summary; proc_desc} : Specs.summary = {RecordDomain.uninit_vars= _; RecordDomain.aliased_vars= _; RecordDomain.prepost= pre, post} -> Summary.update_summary {pre; post} summary | None - -> L.(die InternalError) - "Analyzer failed to compute post for %a" Typ.Procname.pp (Procdesc.get_proc_name proc_desc) + -> if Procdesc.Node.get_succs (Procdesc.get_start_node proc_desc) <> [] then ( + L.internal_error "Uninit analyzer failed to compute post for %a" Typ.Procname.pp + (Procdesc.get_proc_name proc_desc) ; + summary ) + else summary