[all-commits] [llvm/llvm-project] fe97a6: [tsan] Add callbacks for futex syscalls and mark t...

Nazım Can Altınova via All-commits all-commits at lists.llvm.org
Tue Mar 26 04:34:14 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe97a6148ebce0091c03abd12abd814cb55afe24
      https://github.com/llvm/llvm-project/commit/fe97a6148ebce0091c03abd12abd814cb55afe24
  Author: Nazım Can Altınova <canaltinova at gmail.com>
  Date:   2024-03-26 (Tue, 26 Mar 2024)

  Changed paths:
    M compiler-rt/include/sanitizer/linux_syscall_hooks.h
    M compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
    A compiler-rt/test/tsan/signal_in_futex_wait.cpp

  Log Message:
  -----------
  [tsan] Add callbacks for futex syscalls and mark them as blocking on tsan (#86537)

Fixes #83844.

This PR adds callbacks to mark futex syscalls as blocking. Unfortunately
we didn't have a mechanism before to mark syscalls as a blocking call,
so I had to implement it, but it mostly reuses the `BlockingCall`
implementation
[here](https://github.com/llvm/llvm-project/blob/96819daa3d095cf9f662e0229dc82eaaa25480e8/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp#L362-L380).

The issue includes some information but this issue was discovered
because Rust uses futexes directly. So most likely we need to update
Rust as well to use these callbacks.

Also see the latest comments in #85188 for some context.
I also sent another PR #84162 to mark `pthread_*_lock` calls as
blocking.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list