[all-commits] [llvm/llvm-project] b177ac: [compiler-rt][rtsan] Use sanitizer internal alloca...

davidtrevelyan via All-commits all-commits at lists.llvm.org
Mon Jul 22 13:35:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b177ac4a44ec4024fec6927f4870ee96e9070696
      https://github.com/llvm/llvm-project/commit/b177ac4a44ec4024fec6927f4870ee96e9070696
  Author: davidtrevelyan <davidtrevelyan at users.noreply.github.com>
  Date:   2024-07-22 (Mon, 22 Jul 2024)

  Changed paths:
    M compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
    M compiler-rt/lib/rtsan/rtsan.cpp
    M compiler-rt/lib/rtsan/rtsan.h
    M compiler-rt/lib/rtsan/rtsan_interceptors.cpp

  Log Message:
  -----------
  [compiler-rt][rtsan] Use sanitizer internal allocator during rtsan init to avoid segfault in dlsym (#98679)

Follows https://github.com/llvm/llvm-project/pull/98268 with a fix for a
segfault during preinit on `ubuntu:20.04` environments. Previously,
`rtsan` was not handling the situation where `dlsym` calls `calloc`
during the interceptors initialization, resulting in a call to a
function at a null address.

@cjappl and I took inspiration from the solution in `nsan`, but we
re-used the sanitizer internal allocator instead of our own static
buffer. This PR also re-enables the existing non-instrumented `rtsan`
tests for `x86_64` and `arm64` architectures.

---------

Co-authored-by: Chris Apple <cja-private at pm.me>



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