[procdesc] look at capture DB only -- pulse

Summary:
`AnalysisCallbacks.get_proc_desc` potentially introduces non-determinism because it first looks for the `proc_desc` in the capture DB and if absent it tries to retrieve it from a summary.

The problem is the two proc descs are generally different, as the one in the summary is preanalysed and the one in the capture DB is not.

Unless the caller specifically needs a preanalysed `procdesc`, calls to `AnalysisCallbacks.get_proc_desc` should be replaced with `Procdesc.load`.

Reviewed By: skcho

Differential Revision: D29827647

fbshipit-source-id: 8b1dc289c
master
Nikos Gorogiannis 3 years ago committed by Facebook GitHub Bot
parent e00fe73f91
commit 89ba2cc163

@ -306,7 +306,7 @@ let call tenv path ~caller_proc_desc ~(callee_data : (Procdesc.t * PulseSummary.
|> unknown_call tenv path call_loc (SkippedKnownCall callee_pname) ~ret ~actuals
~formals_opt
in
let callee_procdesc_opt = AnalysisCallbacks.get_proc_desc callee_pname in
let callee_procdesc_opt = Procdesc.load callee_pname in
Option.value_map callee_procdesc_opt
~default:[Ok (ContinueProgram astate_unknown)]
~f:(unknown_objc_nil_messaging astate_unknown)

Loading…
Cancel
Save