[all-commits] [llvm/llvm-project] 7b302f: tsan: strip top inlined internal frames

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Thu Jul 15 10:37:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b302fc9b04c7991cdb869b65316e0d72e41042e
      https://github.com/llvm/llvm-project/commit/7b302fc9b04c7991cdb869b65316e0d72e41042e
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-07-15 (Thu, 15 Jul 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp

  Log Message:
  -----------
  tsan: strip top inlined internal frames

The new GET_CURRENT_PC() can lead to spurious top inlined internal frames.
Here are 2 examples from bots, in both cases the malloc is supposed to be
the top frame (#0):

  WARNING: ThreadSanitizer: signal-unsafe call inside of a signal
    #0 __sanitizer::StackTrace::GetNextInstructionPc(unsigned long)
    #1 malloc

  Location is heap block of size 99 at 0xbe3800003800 allocated by thread T1:
    #0 __sanitizer::StackTrace::GetNextInstructionPc(unsigned long)
    #1 malloc

Let's strip these internal top frames from reports.
With other code changes I also observed some top frames
from __tsan::ScopedInterceptor, proactively remove these as well.

Differential Revision: https://reviews.llvm.org/D106081




More information about the All-commits mailing list