[compiler-rt] [ubsan-minimal] Switch to weak symbols for callbacks to allow overriding in client code (PR #119242)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 15:52:52 PST 2024
================
@@ -20,20 +20,21 @@ static __sanitizer::atomic_uintptr_t caller_pcs[kMaxCallerPcs];
// that "too many errors" has already been reported.
static __sanitizer::atomic_uint32_t caller_pcs_sz;
-__attribute__((noinline)) static bool report_this_error(uintptr_t caller) {
+SANITIZER_INTERFACE_WEAK_DEF(void, __ubsan_report_error, uintptr_t caller,
----------------
vitalybuka wrote:
maybe sinc into __ubsan_report_error
```
char msg_buf[MSG_BUF_LEN(msg)] = MSG_TMPL(msg); \
decorate_msg(MSG_TMPL_END(msg_buf, msg), caller);
```
https://github.com/llvm/llvm-project/pull/119242
More information about the llvm-commits
mailing list