From 6d78026e8ed1903a01da16ee0f307415d4e03ae0 Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Thu, 17 Oct 2019 12:38:48 -0700 Subject: [PATCH] [starvation] fix bug in starting location of trace Summary: The trace starts always at a dummy location. Fix. Reviewed By: ezgicicek Differential Revision: D17981065 fbshipit-source-id: 2807a04fe --- infer/src/concurrency/starvationDomain.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infer/src/concurrency/starvationDomain.ml b/infer/src/concurrency/starvationDomain.ml index 6b545210e..5d0091714 100644 --- a/infer/src/concurrency/starvationDomain.ml +++ b/infer/src/concurrency/starvationDomain.ml @@ -270,7 +270,7 @@ module CriticalPair = struct let make_trace ?(header = "") ?(include_acquisitions = true) top_pname - {elem= {acquisitions; event}; trace; loc} = + ({elem= {acquisitions; event}; trace; loc} as pair) = let acquisitions_map = if include_acquisitions then Acquisitions.fold @@ -283,7 +283,7 @@ module CriticalPair = struct in let header_step = let description = F.asprintf "%s%a" header pname_pp top_pname in - let loc = Location.dummy in + let loc = get_loc pair in Errlog.make_trace_element 0 loc description [] in (* construct the trace segment starting at [call_site] and ending at next call *)