Kernel: Print KUBSAN backtrace to screen if KUBSAN is deadly

This commit is contained in:
Luke Wilde 2021-12-29 15:40:33 +00:00 committed by Andreas Kling
commit c4f60844c5
Notes: sideshowbarker 2024-07-17 21:58:45 +09:00

View file

@ -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();