From f6d1e45bf33b4e1e860f80d5176a2a38614880eb Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 15 Sep 2020 13:50:47 -0600 Subject: [PATCH] Kernel: Don't symbolicate stack traces in IRQ handlers If we're capturing a stack trace in an IRQ handler, don't try to symbolicate it as we may not be able to access all pages. --- Kernel/Thread.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index f7bd140d44..6e08de4ea9 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -857,7 +857,11 @@ String Thread::backtrace_impl() Vector recognized_symbols; auto& process = const_cast(this->process()); - auto elf_bundle = process.elf_bundle(); + OwnPtr elf_bundle; + if (!Processor::current().in_irq()) { + // If we're handling IRQs we can't really safely symbolicate + elf_bundle = process.elf_bundle(); + } ProcessPagingScope paging_scope(process); // To prevent a context switch involving this thread, which may happen