[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:55:14 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:

and lets flip orcer
__ubsan_report_error(caller, msg); -> __ubsan_report_error(kind, caller);

https://github.com/llvm/llvm-project/pull/119242


More information about the llvm-commits mailing list