From a7c657da567e4f87e65e994e9f6917ae103a8c93 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 21 Nov 2017 03:47:24 -0800 Subject: [PATCH] [lock-consistency] Only suppress truncated traces in Java Summary: In C++ some modeled functions have definitions, which leads to traces that contain an access from the modeling, but continue on into the implementation of the modeled function. Such traces appear the same as those that are truncated due to limitations of the buck integration in the Java analysis. Since all Java models are for functions without definitions in the code base, this diff limits the truncated trace suppression to the Java analysis. Reviewed By: sblackshear Differential Revision: D6373793 fbshipit-source-id: 1f01509 --- infer/src/concurrency/RacerD.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/concurrency/RacerD.ml b/infer/src/concurrency/RacerD.ml index f700adfd2..f4b87a72c 100644 --- a/infer/src/concurrency/RacerD.ml +++ b/infer/src/concurrency/RacerD.ml @@ -1168,7 +1168,7 @@ let report_thread_safety_violation tenv pdesc ~make_description ~report_kind acc let is_full_trace = TraceElem.is_direct final_sink in (* Traces can be truncated due to limitations of our Buck integration. If we have a truncated trace, it's probably going to be too confusing to be actionable. Skip it. *) - if is_full_trace || not Config.filtering then + if not (Typ.Procname.is_java pname) || is_full_trace || not Config.filtering then let final_sink_site = PathDomain.Sink.call_site final_sink in let initial_sink, _ = List.last_exn sinks in let initial_sink_site = PathDomain.Sink.call_site initial_sink in