[compiler-rt] [UBSan] [compiler-rt] add preservecc variants of handlers (PR #168643)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 10:56:12 PST 2025


================
@@ -146,6 +161,10 @@ void NORETURN CheckFailed(const char *file, int, const char *cond, u64, u64) {
 #define HANDLER_RECOVER_PTR(name, kind)                                        \
   INTERFACE void __ubsan_handle_##name##_minimal(const uintptr_t address) {    \
     __ubsan_report_error(kind, GET_CALLER_PC(), &address);                     \
+  }                                                                            \
+  INTERFACE void __ubsan_handle_##name##_minimal_preserve(                     \
+      const uintptr_t address) [[clang::preserve_all]] {                       \
+    __ubsan_report_error_preserve(kind, GET_CALLER_PC(), &address);            \
----------------
vitalybuka wrote:

why can't we call __ubsan_report_error?

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


More information about the llvm-commits mailing list