|
|
|
@ -124,16 +124,19 @@ module Make (TraceDomain : Trace.S) = struct
|
|
|
|
|
let add_sinks sinks actuals ({ Domain.access_tree; id_map; } as astate) proc_data loc =
|
|
|
|
|
let f_resolve_id = resolve_id id_map in
|
|
|
|
|
(* add [sink] to the trace associated with the [formal_num]th actual *)
|
|
|
|
|
let add_sink_to_actual access_tree_acc (formal_num, sink) =
|
|
|
|
|
let actual_exp, actual_typ = IList.nth actuals formal_num in
|
|
|
|
|
let add_sink_to_actual access_tree_acc (sink_param : TraceDomain.Sink.t Sink.parameter) =
|
|
|
|
|
let actual_exp, actual_typ = IList.nth actuals sink_param.index in
|
|
|
|
|
match AccessPath.of_exp actual_exp actual_typ ~f_resolve_id with
|
|
|
|
|
| Some actual_ap ->
|
|
|
|
|
let actual_ap = AccessPath.Exact actual_ap in
|
|
|
|
|
let actual_ap =
|
|
|
|
|
if sink_param.report_reachable
|
|
|
|
|
then AccessPath.Abstracted actual_ap
|
|
|
|
|
else AccessPath.Exact actual_ap in
|
|
|
|
|
begin
|
|
|
|
|
match access_path_get_node actual_ap access_tree_acc proc_data loc with
|
|
|
|
|
| Some (actual_trace, _) ->
|
|
|
|
|
(* add callee_pname to actual trace as a sink *)
|
|
|
|
|
let actual_trace' = TraceDomain.add_sink sink actual_trace in
|
|
|
|
|
let actual_trace' = TraceDomain.add_sink sink_param.sink actual_trace in
|
|
|
|
|
TraceDomain.log_reports
|
|
|
|
|
actual_trace'
|
|
|
|
|
(Cfg.Procdesc.get_proc_name proc_data.ProcData.pdesc)
|
|
|
|
|