[all-commits] [llvm/llvm-project] 348389: tsan: lock internal allocator around fork

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Wed Nov 24 08:01:40 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 348389263ca545f0dd71aea505c595331d2a07c5
      https://github.com/llvm/llvm-project/commit/348389263ca545f0dd71aea505c595331d2a07c5
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-11-24 (Wed, 24 Nov 2021)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_allocator.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h
    M compiler-rt/lib/tsan/rtl/tsan_mman.cpp
    M compiler-rt/lib/tsan/rtl/tsan_mman.h
    M compiler-rt/lib/tsan/rtl/tsan_rtl.cpp

  Log Message:
  -----------
  tsan: lock internal allocator around fork

There is a small chance that the internal allocator is locked
during fork and then the new process is created with locked
internal allocator and any attempts to use it will deadlock.
For example, if detected a suppressed race in the parent during fork
and then another suppressed race after the fork.
This becomes much more likely with the new tsan runtime
as it uses the internal allocator for more things.

Reviewed By: melver

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




More information about the All-commits mailing list