[all-commits] [llvm/llvm-project] 92a870: [compiler-rt] Map internal_sigaction to __sys_siga...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Thu Jun 6 15:22:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92a870888c2d19f0004d2d0bc90730559c6bf0f4
      https://github.com/llvm/llvm-project/commit/92a870888c2d19f0004d2d0bc90730559c6bf0f4
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2024-06-07 (Fri, 07 Jun 2024)

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

  Log Message:
  -----------
  [compiler-rt] Map internal_sigaction to __sys_sigaction on FreeBSD (#84441)

This function is called during very early startup and which can result
in a crash on FreeBSD. The sigaction() function in libc is indirected
via a table so that it can be interposed by the threading library
rather than calling the syscall directly. In the crash I was observing
this table had not yet been relocated, so we ended up jumping to an
invalid address. To avoid this problem we can call __sys_sigaction,
which calls the syscall directly and in FreeBSD 15 is part of libsys
rather than libc, so does not depend on libc being fully initialized.



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