diff --git a/kernel/ubsan.cpp b/kernel/ubsan.cpp index 6b737d31a6..8ee064d470 100644 --- a/kernel/ubsan.cpp +++ b/kernel/ubsan.cpp @@ -75,6 +75,11 @@ extern "C" builtin_check_kind kind; }; + struct unreachable_data + { + struct source_location location; + }; + using value_handle = uintptr_t; static const char* type_check_kinds[] = { @@ -114,6 +119,8 @@ extern "C" HANDLER(__ubsan_handle_invalid_builtin, false, invalid_builtin_data* data); + HANDLER(__ubsan_handle_builtin_unreachable, true, unreachable_data* data); + void __ubsan_handle_type_mismatch_v1(type_mismatch_data* data, value_handle pointer) { print_location(data->location);