[all-commits] [llvm/llvm-project] 7ae5fe: [sanitizer] Use close_range on Linux to close FDs ...

Paweł Bylica via All-commits all-commits at lists.llvm.org
Wed Apr 15 00:38:32 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ae5fe63dd979eae13ea04e166f94056ec1306ca
      https://github.com/llvm/llvm-project/commit/7ae5fe63dd979eae13ea04e166f94056ec1306ca
  Author: Paweł Bylica <pawel at hepcolgum.band>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

  Log Message:
  -----------
  [sanitizer] Use close_range on Linux to close FDs in StartSubprocess (#191450)

Enable the close_range syscall on Linux when __NR_close_range is
available in kernel headers (Linux 5.9+). On older kernels, the
syscall returns ENOSYS and callers fall back gracefully.

This fixes the slow FD closing loop in StartSubprocess when
RLIMIT_NOFILE is high (e.g. 1B in Docker environments).

Fixes https://github.com/llvm/llvm-project/issues/63297.
Fixes https://github.com/llvm/llvm-project/issues/152459.



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