From 98f65298c50a905865c5cc2b8c634ff711b874cd Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 16 Oct 2018 07:41:53 -0700 Subject: [PATCH] [log] do not crash when logging errors Summary: In some error paths we may end up querying the state for the instruction being executed, but that is only populated by biabduction. Now it's populated by AI checkers too. Reviewed By: jberdine Differential Revision: D10381068 fbshipit-source-id: dca1325d7 --- infer/src/absint/AbstractInterpreter.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/infer/src/absint/AbstractInterpreter.ml b/infer/src/absint/AbstractInterpreter.ml index 2dcb899f1..e46d46183 100644 --- a/infer/src/absint/AbstractInterpreter.ml +++ b/infer/src/absint/AbstractInterpreter.ml @@ -8,6 +8,7 @@ open! IStd module F = Format module L = Logging +module AnalysisState = State type debug = | Default @@ -126,6 +127,7 @@ module AbstractInterpreterCommon (TransferFunctions : TransferFunctions.SIL) = s (Node.underlying_node node) ; let astate_post = let compute_post pre instr = + AnalysisState.set_instr instr ; try let post = TransferFunctions.exec_instr pre proc_data node instr in (* don't forget to reset this so we output messages for future errors too *)