From c4f60844c5d2bd51e70a621753208fe0c9392339 Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Wed, 29 Dec 2021 15:40:33 +0000 Subject: [PATCH] Kernel: Print KUBSAN backtrace to screen if KUBSAN is deadly --- Kernel/UBSanitizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/UBSanitizer.cpp b/Kernel/UBSanitizer.cpp index 7765c7ea9f..005ce20eb1 100644 --- a/Kernel/UBSanitizer.cpp +++ b/Kernel/UBSanitizer.cpp @@ -22,7 +22,7 @@ static void print_location(const SourceLocation& location) critical_dmesgln("KUBSAN: in unknown file"); else critical_dmesgln("KUBSAN: at {}, line {}, column: {}", location.filename(), location.line(), location.column()); - dump_backtrace(); + dump_backtrace(g_ubsan_is_deadly ? PrintToScreen::Yes : PrintToScreen::No); if (g_ubsan_is_deadly) { critical_dmesgln("UB is configured to be deadly, halting the system."); Processor::halt();