[all-commits] [llvm/llvm-project] e91595: tsan: don't start background thread after clone

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Fri Nov 12 03:59:01 PST 2021


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

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
    M compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
    M compiler-rt/lib/tsan/rtl/tsan_rtl.h
    A compiler-rt/test/tsan/Linux/clone_setns.cpp

  Log Message:
  -----------
  tsan: don't start background thread after clone

Start the background thread only after fork, but not after clone.
For fork we did this always and it's known to work (or user code has adopted).
But if we do this for the new clone interceptor some code (sandbox2) fails.
So model we used to do for years and don't start the background thread after clone.

Reviewed By: melver

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




More information about the All-commits mailing list