[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
Mon Dec 9 15:16:53 PST 2024


================
@@ -0,0 +1,14 @@
+// RUN: %clang -fsanitize=implicit-integer-sign-change %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
+
+#include <stdio.h>
+#include <stdint.h>
+
+void __ubsan_handle_implicit_conversion_minimal() {
----------------
vitalybuka wrote:

I think it's going to be hard to maintain on client size, when we add more types of checks

I believe it should be single function with simple interface.

Maybe just:
`void SANITIZER_CDECL
__sanitizer_report_error_summary(const char *error_summary);`

With exactly the same format of output.
"SUMMARY: ubsan: morestuff"

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


More information about the llvm-commits mailing list