1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:37:35 +00:00

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
parent 8eb01c0b11
commit c4f60844c5

View file

@ -22,7 +22,7 @@ static void print_location(const SourceLocation& location)
critical_dmesgln("KUBSAN: in unknown file"); critical_dmesgln("KUBSAN: in unknown file");
else else
critical_dmesgln("KUBSAN: at {}, line {}, column: {}", location.filename(), location.line(), location.column()); 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) { if (g_ubsan_is_deadly) {
critical_dmesgln("UB is configured to be deadly, halting the system."); critical_dmesgln("UB is configured to be deadly, halting the system.");
Processor::halt(); Processor::halt();