From 9a2768d66d21cf73d2dd2ffa4ec53c7b5bfc46a7 Mon Sep 17 00:00:00 2001 From: Sungkeun Cho Date: Tue, 13 Apr 2021 09:19:44 -0700 Subject: [PATCH] [purity] Use instruction index for gettting inferbo result Reviewed By: ezgicicek Differential Revision: D27735553 fbshipit-source-id: cb27c2f9b --- infer/src/checkers/PurityAnalysis.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/infer/src/checkers/PurityAnalysis.ml b/infer/src/checkers/PurityAnalysis.ml index dc3699d42..480290944 100644 --- a/infer/src/checkers/PurityAnalysis.ml +++ b/infer/src/checkers/PurityAnalysis.ml @@ -143,10 +143,8 @@ module TransferFunctions = struct let modified_global ae = HilExp.AccessExpression.get_base ae |> fst |> Var.is_global let exec_instr (astate : Domain.t) {tenv; inferbo_invariant_map; formals; get_callee_summary} - (node : CFG.Node.t) _ (instr : HilInstr.t) = - let (node_id : InstrCFG.Node.id) = - CFG.Node.underlying_node node |> InstrCFG.last_of_underlying_node |> InstrCFG.Node.id - in + (node : CFG.Node.t) idx (instr : HilInstr.t) = + let (node_id : InstrCFG.Node.id) = CFG.Node.to_instr idx node |> ProcCfg.InstrNode.id in let inferbo_mem = BufferOverrunAnalysis.extract_post node_id inferbo_invariant_map in if Option.is_none inferbo_mem then debug "Inferbo memory at %a was not found\n" InstrCFG.Node.pp_id node_id ;