From a0b237fe06de4635c6bac62f999e63e295c1e5e9 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Wed, 29 Apr 2020 02:59:49 -0700 Subject: [PATCH] another one Summary: kill me Reviewed By: dulmarod Differential Revision: D21261641 fbshipit-source-id: 94a367735 --- infer/src/biabduction/SymExec.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/infer/src/biabduction/SymExec.ml b/infer/src/biabduction/SymExec.ml index b37f4c51c..dbb7763b6 100644 --- a/infer/src/biabduction/SymExec.ml +++ b/infer/src/biabduction/SymExec.ml @@ -338,13 +338,14 @@ let dangerous_functions = ref (List.map ~f:Procname.from_string_c_fun dangerous_list) -let check_inherently_dangerous_function caller_pname callee_pname = +let check_inherently_dangerous_function {InterproceduralAnalysis.proc_desc; err_log} callee_pname = if List.exists ~f:(Procname.equal callee_pname) !dangerous_functions then let exn = Exceptions.Inherently_dangerous_function (Localise.desc_inherently_dangerous_function callee_pname) in - SummaryReporting.log_issue_deprecated_using_state Exceptions.Warning caller_pname exn + let attrs = Procdesc.get_attributes proc_desc in + BiabductionReporting.log_issue_deprecated_using_state attrs err_log Exceptions.Warning exn let reason_to_skip ~callee_desc : string option = @@ -1803,16 +1804,15 @@ and sym_exec_alloc_model analysis_data pname ret_typ ret_id_typ loc prop path : (** Perform symbolic execution for a function call *) and proc_call (callee_pdesc, callee_summary) - { Builtin.analysis_data= {proc_desc= caller_pdesc; tenv; _} as analysis_data + { Builtin.analysis_data= {tenv; proc_desc= caller_pdesc; _} as analysis_data ; prop_= pre ; path ; ret_id_typ ; args= actual_pars ; loc } = - let caller_pname = Procdesc.get_proc_name caller_pdesc in let callee_pname = Procdesc.get_proc_name callee_pdesc in let callee_attributes = Procdesc.get_attributes callee_pdesc in - check_inherently_dangerous_function caller_pname callee_pname ; + check_inherently_dangerous_function analysis_data callee_pname ; let formal_types = List.map ~f:snd callee_attributes.ProcAttributes.formals in let rec comb actual_pars formal_types = match (actual_pars, formal_types) with