diff --git a/infer/src/topl/Topl.ml b/infer/src/topl/Topl.ml index 21584808d3..5b19a4e96b 100644 --- a/infer/src/topl/Topl.ml +++ b/infer/src/topl/Topl.ml @@ -7,13 +7,15 @@ open! IStd +let mutex = Error_checking_mutex.create () + let automaton = lazy (ToplAutomaton.make (Config.topl_properties @ DataFlowQuery.convert_to_topl Config.data_flow_queries_on_topl) ) -let automaton () = Lazy.force automaton +let automaton () = Error_checking_mutex.critical_section mutex ~f:(fun () -> Lazy.force automaton) let is_active () = Config.is_checker_enabled Topl