[PATCH] D144830: [asan darwin] Allow clients to implement `__sanitizer_report_error_summary`

Roy Sundahl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 08:43:18 PST 2023


rsundahl added inline comments.


================
Comment at: compiler-rt/test/asan/TestCases/report_error_summary.cpp:4
+#include <stdio.h>
+
+extern "C" void __sanitizer_report_error_summary(const char *summary) {
----------------
rsundahl wrote:
> ```
> // Required for dyld macOS 12.0+
> #if (__APPLE__)
> __attribute__((weak))
> #endif
> ```
> You'll need to add this if you want dyld64 to see this override of __sanitizer_report_error_summary(). dyld64 will not consider and open a dylib during weak def coalescing unless there is at least one weak symbol in it. It doesn't have to be the intended "stronger" symbol, it could be any symbol like "foo", the module just has to have at least one.
dyld64 -> ld64


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144830/new/

https://reviews.llvm.org/D144830



More information about the llvm-commits mailing list