[all-commits] [llvm/llvm-project] c3c324: tsan: lock ScopedErrorReportLock around fork

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Thu Jul 15 12:00:25 PDT 2021


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

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_common.h
    M compiler-rt/lib/sanitizer_common/sanitizer_mutex.h
    M compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h
    M compiler-rt/lib/sanitizer_common/sanitizer_thread_safety.h
    M compiler-rt/lib/tsan/rtl/tsan_rtl.cpp

  Log Message:
  -----------
  tsan: lock ScopedErrorReportLock around fork

Currently we don't lock ScopedErrorReportLock around fork
and it mostly works becuase tsan has own report_mtx that
is locked around fork and tsan reports.
However, sanitizer_common code prints some own reports
which are not protected by tsan's report_mtx. So it's better
to lock ScopedErrorReportLock explicitly.

Reviewed By: melver

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




More information about the All-commits mailing list