[all-commits] [llvm/llvm-project] 16baf5: tsan: avoid false positives related to epoll

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Wed Apr 27 08:00:05 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 16baf59c6d0b3bf7392995e3e55fc9e2ba9cb5e7
      https://github.com/llvm/llvm-project/commit/16baf59c6d0b3bf7392995e3e55fc9e2ba9cb5e7
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2022-04-27 (Wed, 27 Apr 2022)

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

  Log Message:
  -----------
  tsan: avoid false positives related to epoll

An application can use the mere fact of epoll_wait returning an fd
as synchronization with the write on the fd that triggered the notification.
This pattern come up in an internal networking server (b/229276331).

If an fd is added to epoll, setup a link from the fd to the epoll fd
and use it for synchronization as well.

Reviewed By: melver

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




More information about the All-commits mailing list