From 49a5ca3d09deefe0899cc44fccf6a7b462fca70c Mon Sep 17 00:00:00 2001 From: Seiya Nuta Date: Sat, 9 Mar 2024 17:58:10 +0900 Subject: [PATCH] =?UTF-8?q?`-fsatinize=3Dfunction`=20=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clang (C言語) に新しいUBSanの検査項目が追加されたので、デバッグビルドが通らないようになっている。 新たに導入されたハンドラを定義することで対応。 https://github.com/nuta/microkernel-book/discussions/16 --- libs/common/ubsan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/common/ubsan.c b/libs/common/ubsan.c index 1315c67..5b76b88 100644 --- a/libs/common/ubsan.c +++ b/libs/common/ubsan.c @@ -36,6 +36,9 @@ void __ubsan_handle_sub_overflow(void) { void __ubsan_handle_mul_overflow(void) { report_ubsan_event("mul overflow"); } +void __ubsan_handle_function_type_mismatch(void) { + report_ubsan_event("__ubsan_handle_function_type_mismatch"); +} void __ubsan_handle_divrem_overflow(void) { report_ubsan_event("divrem overflow"); }