[all-commits] [llvm/llvm-project] 2606a5: compiler-rt: sanitizer_common: use close_range() i...

Kyle Evans via All-commits all-commits at lists.llvm.org
Thu Oct 31 19:21:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2606a58bc0b675e5ca6030bf6310aaaa00ec7ed1
      https://github.com/llvm/llvm-project/commit/2606a58bc0b675e5ca6030bf6310aaaa00ec7ed1
  Author: Kyle Evans <kevans91 at users.noreply.github.com>
  Date:   2024-10-31 (Thu, 31 Oct 2024)

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

  Log Message:
  -----------
  compiler-rt: sanitizer_common: use close_range() instead of looping (#114442)

_SC_OPEN_MAX is quite high on FreeBSD, which makes this close() loop a
quite obvious problem when attempting to do any kind of debugging in a
process that uses StartSubprocess. Switch to using close_range(2)
instead to close them all in a single syscall and dramatically reduce
the runtime and syscall trace noise

Linux has an equivalent syscall, but I do not have the capacity to test
that it works there, so this is limited to SANITIZER_FREEBSD for the
time being.



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