|
|
@ -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 add_sinks sinks actuals ({ Domain.access_tree; id_map; } as astate) proc_data loc =
|
|
|
|
let f_resolve_id = resolve_id id_map in
|
|
|
|
let f_resolve_id = resolve_id id_map in
|
|
|
|
(* add [sink] to the trace associated with the [formal_num]th actual *)
|
|
|
|
(* add [sink] to the trace associated with the [formal_num]th actual *)
|
|
|
|
let add_sink_to_actual access_tree_acc (formal_num, sink) =
|
|
|
|
let add_sink_to_actual access_tree_acc (sink_param : TraceDomain.Sink.t Sink.parameter) =
|
|
|
|
let actual_exp, actual_typ = IList.nth actuals formal_num in
|
|
|
|
let actual_exp, actual_typ = IList.nth actuals sink_param.index in
|
|
|
|
match AccessPath.of_exp actual_exp actual_typ ~f_resolve_id with
|
|
|
|
match AccessPath.of_exp actual_exp actual_typ ~f_resolve_id with
|
|
|
|
| Some actual_ap ->
|
|
|
|
| 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
|
|
|
|
begin
|
|
|
|
match access_path_get_node actual_ap access_tree_acc proc_data loc with
|
|
|
|
match access_path_get_node actual_ap access_tree_acc proc_data loc with
|
|
|
|
| Some (actual_trace, _) ->
|
|
|
|
| Some (actual_trace, _) ->
|
|
|
|
(* add callee_pname to actual trace as a sink *)
|
|
|
|
(* 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
|
|
|
|
TraceDomain.log_reports
|
|
|
|
actual_trace'
|
|
|
|
actual_trace'
|
|
|
|
(Cfg.Procdesc.get_proc_name proc_data.ProcData.pdesc)
|
|
|
|
(Cfg.Procdesc.get_proc_name proc_data.ProcData.pdesc)
|
|
|
|