Skip to content

Commit

Permalink
[incr] Add dependency tracking in Attributes.load
Browse files Browse the repository at this point in the history
Summary:
Some analyzers and checkers directly access the `Attributes` of other procedures using
`Attributes.load`.  This induces a dependency which can be missed by existing dependency tracking
infrastructure, but is recorded by these changes.

Reviewed By: ngorogiannis

Differential Revision: D43570917

fbshipit-source-id: 09c9091da80722f7e199ab2517bf32e4b21a7517
  • Loading branch information
bennostein authored and facebook-github-bot committed Feb 27, 2023
1 parent a0bfdbb commit 5aeb169
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions infer/src/IR/Attributes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ let load_from_uid, load, clear_cache, store =
result
in
let load pname =
Dependencies.record_pname_dep pname ;
match Procname.Hash.find_opt cache pname with
| Some _ as result ->
result
Expand Down
2 changes: 1 addition & 1 deletion infer/src/backend/ondemand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ let run_proc_analysis exe_env ?caller_pname callee_pdesc =
incr nesting ;
let source_file = callee_attributes.ProcAttributes.translation_unit in
update_taskbar (Some callee_pname) (Some source_file) ;
let initial_callee_summary = Summary.OnDisk.reset callee_pname in
Preanal.do_preanalysis exe_env callee_pdesc ;
if Config.debug_mode then
DotCfg.emit_proc_desc callee_attributes.translation_unit callee_pdesc |> ignore ;
let initial_callee_summary = Summary.OnDisk.reset callee_pname in
add_active callee_pname ;
initial_callee_summary
in
Expand Down

0 comments on commit 5aeb169

Please sign in to comment.