[attrs] look at capture DB only -- uninit.ml

Summary:
`AnalysisCallbacks.proc_resolve_attributes` introduces non-determinism because it first looks for the attributes in a (procdesc in a) summary and if it doesn't find it then returns the value in the attribute column from the capture DB.

The problem is:
- the main factor affecting the existence of a summary on-disk is timing;
- the two proc descs are generally different, as the one in the summary is preanalysed and the one in the capture DB is not;
- this extends to the attributes included in the proc desc in some cases.

The plan is to eliminate these calls one by one, replacing with `Attributes.load` which only looks at the capture DB attribute column.

Reviewed By: skcho

Differential Revision: D29816411

fbshipit-source-id: d06c4bd48
master
Nikos Gorogiannis 3 years ago committed by Facebook GitHub Bot
parent ac158b26ea
commit 1afd05a689

@ -85,9 +85,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
let is_array t = match t.Typ.desc with Typ.Tarray _ -> true | _ -> false
let get_formals pname =
AnalysisCallbacks.proc_resolve_attributes pname |> Option.map ~f:ProcAttributes.get_formals
let get_formals pname = Attributes.load pname |> Option.map ~f:ProcAttributes.get_formals
let should_report_var pdesc tenv maybe_uninit_vars access_expr =
let base = HilExp.AccessExpression.get_base access_expr in

Loading…
Cancel
Save