[all-commits] [llvm/llvm-project] ed9ef9: tsan: Consider SI_TIMER signals always asynchronous

Marco Elver via All-commits all-commits at lists.llvm.org
Fri Jan 20 02:48:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed9ef9b4f248c62022bb1bebe5e2597cb4f9d209
      https://github.com/llvm/llvm-project/commit/ed9ef9b4f248c62022bb1bebe5e2597cb4f9d209
  Author: Marco Elver <elver at google.com>
  Date:   2023-01-20 (Fri, 20 Jan 2023)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

  Log Message:
  -----------
  tsan: Consider SI_TIMER signals always asynchronous

POSIX timer can be configured to send any kind of signal, however, it
fundamentally does not make sense to consider a timer a synchronous
signal. Teach TSan that timers are never synchronous.

The tricky bit here is correctly defining compiler-rt's siginfo
replacement, which is a rather complex struct. Extend it in a limited
way that is mostly cross-platform compatible and add offset tests in
sanitizer_platform_limits_posix.cpp.

Reviewed By: dvyukov

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




More information about the All-commits mailing list