[all-commits] [llvm/llvm-project] f24909: [tsan] Refine fstat{, 64} interceptors (#86625)

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Apr 2 14:46:50 PDT 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f249092ef26d6fe9627b0158c7c15dee241226db
      https://github.com/llvm/llvm-project/commit/f249092ef26d6fe9627b0158c7c15dee241226db
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-04-01 (Mon, 01 Apr 2024)

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

  Log Message:
  -----------
  [tsan] Refine fstat{,64} interceptors (#86625)

In glibc versions before 2.33. `libc_nonshared.a` defines
`__fxstat/__fxstat64` but there is no `fstat/fstat64`. glibc 2.33 added
`fstat/fstat64` and obsoleted `__fxstat/__fxstat64`. Ports added after
2.33 do not provide `__fxstat/__fxstat64`, so our `fstat/fstat64`
interceptors using `__fxstat/__fxstat64` interceptors would lead to
runtime failures on such ports (LoongArch and certain RISC-V ports).

Similar to https://reviews.llvm.org/D118423, refine the conditions that
we define fstat{,64} interceptors. `fstat` is supported by musl/*BSD
while `fstat64` is glibc only.

(cherry picked from commit d5224b73ccd09a6759759791f58426b6acd4a2e2)



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