Skip to content

Commit

Permalink
[lock-consistency] Only suppress truncated traces in Java
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jberdine authored and facebook-github-bot committed Nov 21, 2017
1 parent c195e67 commit a7c657d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infer/src/concurrency/RacerD.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a7c657d

Please sign in to comment.