[all-commits] [llvm/llvm-project] 28dc3a: [asan darwin] Allow clients to implement `__saniti...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Mon Mar 6 16:38:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28dc3aa7bc9f20f7f283663d63744ed4785a6e7b
      https://github.com/llvm/llvm-project/commit/28dc3aa7bc9f20f7f283663d63744ed4785a6e7b
  Author: Dave MacLachlan <dmaclach at google.com>
  Date:   2023-03-06 (Mon, 06 Mar 2023)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
    A compiler-rt/test/asan/TestCases/report_error_summary.cpp

  Log Message:
  -----------
  [asan darwin] Allow clients to implement `__sanitizer_report_error_summary`

`__sanitizer_report_error_summary` is declared `llvm/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h` as being able to be overridden by the client. On darwin the sanitizer runtime uses this symbol to find references to the sanitizer libraries, so if you override it you end up with the error `=ERROR: Interceptors are not working. This may be because AddressSanitizer is loaded too late (e.g. via dlopen). Please launch the executable with:` at launch time.

Replace uses of `__sanitizer_report_error_summary` for finding the sanitizer libraries with using the address of a local function.

Reviewed By: yln, vitalybuka

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




More information about the All-commits mailing list