[all-commits] [llvm/llvm-project] 6d890a: [Sanitizers] Cleanup handling of stat64/statfs64

Mariusz Borsa via All-commits all-commits at lists.llvm.org
Thu Jun 9 12:51:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d890a0fb8b1962cf7b58e9e16ff4545f1f2b84f
      https://github.com/llvm/llvm-project/commit/6d890a0fb8b1962cf7b58e9e16ff4545f1f2b84f
  Author: Mariusz Borsa <m_borsa at apple.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

  Log Message:
  -----------
  [Sanitizers] Cleanup handling of stat64/statfs64

There are differences in handling of stat64/statfs64 calls by sanitizers between Linux and macOS. Versions of macOS starting with 10.6 drop the stat64/statfs64 APIs completely, relying on the linker to redirect stat/statfs to the appropriate 64 bit versions. Emitting variables needed by sanitizers is thus controlled by convoluted sets of conditions, involving Linux, IOS, macOS and Android, sprinkled around files.

This change adresses it, allowing to specify presence/absence of stat64/statfs64 for each platform, in a single location. Also, it adresses the Android case which handles stat64, but not statfs64.

Adding Vitaly as a reviewer since he seems to be actively working on sanitizers, perhaps can comment on the Android bit

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




More information about the All-commits mailing list