From 2d2d861686c1ba1ee556c076c3030ce4190de516 Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Tue, 18 Dec 2018 12:26:55 -0800 Subject: [PATCH] [racerd] reduce size of IssueAuxData Reviewed By: jvillard Differential Revision: D13505031 fbshipit-source-id: 90f1974a7 --- infer/src/backend/Differential.ml | 2 +- infer/src/concurrency/IssueAuxData.ml | 2 +- infer/src/concurrency/IssueAuxData.mli | 2 +- infer/src/concurrency/RacerD.ml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infer/src/backend/Differential.ml b/infer/src/backend/Differential.ml index eb148f9b3..4bc8c58cc 100644 --- a/infer/src/backend/Differential.ml +++ b/infer/src/backend/Differential.ml @@ -45,7 +45,7 @@ let dedup (issues : Jsonbug_t.jsonbug list) = ~f:(fun (reported_ends, nondup_issues) (issue : Jsonbug_t.jsonbug) -> match issue.access with | Some encoded -> - let _, _, end_locs = IssueAuxData.decode encoded in + let end_locs = IssueAuxData.decode encoded in if is_duplicate_report end_locs reported_ends then (reported_ends, nondup_issues) else (LocListSet.add reported_ends end_locs, {issue with access= None} :: nondup_issues) | None -> diff --git a/infer/src/concurrency/IssueAuxData.ml b/infer/src/concurrency/IssueAuxData.ml index b3f666a8f..ba0f348e6 100644 --- a/infer/src/concurrency/IssueAuxData.ml +++ b/infer/src/concurrency/IssueAuxData.ml @@ -7,7 +7,7 @@ open! IStd -type t = Typ.Procname.t * RacerDDomain.TraceElem.t * Location.t list +type t = Location.t list let encode decoded = B64.encode (Marshal.to_string decoded []) diff --git a/infer/src/concurrency/IssueAuxData.mli b/infer/src/concurrency/IssueAuxData.mli index 2cb77d73f..295408ded 100644 --- a/infer/src/concurrency/IssueAuxData.mli +++ b/infer/src/concurrency/IssueAuxData.mli @@ -7,7 +7,7 @@ open! IStd -type t = Typ.Procname.t * RacerDDomain.TraceElem.t * Location.t list +type t = Location.t list val encode : t -> string diff --git a/infer/src/concurrency/RacerD.ml b/infer/src/concurrency/RacerD.ml index 496c2e4d7..dcbc79056 100644 --- a/infer/src/concurrency/RacerD.ml +++ b/infer/src/concurrency/RacerD.ml @@ -885,7 +885,7 @@ let report_thread_safety_violation tenv pdesc ~make_description ~report_kind acc let issue_type, explanation = get_reporting_explanation report_kind tenv pname thread in let error_message = F.sprintf "%s%s" description explanation in let end_locs = Option.to_list original_end @ Option.to_list conflict_end in - let access = IssueAuxData.encode (pname, access, end_locs) in + let access = IssueAuxData.encode end_locs in log_issue pname ~loc ~ltr ~access issue_type error_message in let trace_of_pname = trace_of_pname access pdesc in