[all-commits] [llvm/llvm-project] 578e66: [tsan] Intercept __tls_get_addr_earlier

Alexander Richardson via All-commits all-commits at lists.llvm.org
Fri Mar 8 22:09:31 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 578e66ac45dfcc5c739f3525bfb82d71282d925c
      https://github.com/llvm/llvm-project/commit/578e66ac45dfcc5c739f3525bfb82d71282d925c
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2024-03-08 (Fri, 08 Mar 2024)

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

  Log Message:
  -----------
  [tsan] Intercept __tls_get_addr_earlier

This can be useful because dlsym() may call malloc on failure which could
result in other interposed functions being called that could eventually
make use of TLS. While the crash that I experienced originally has been
fixed differently (by not using global-dynamic TLS accesses in the mutex
deadlock detector, see https://github.com/llvm/llvm-project/pull/83890),
moving this interception earlier is still a good since it makes the code
a bit more robust against initialization order problems.

Reviewed By: MaskRay, vitalybuka

Pull Request: https://github.com/llvm/llvm-project/pull/83886



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