From 631cdd02048bb51f523d3cf69d5a0eb378f37d02 Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 16 Jan 2023 20:44:45 +0100 Subject: [PATCH] x86_64/CPU: Skip null instruction pointers on stack trace generation --- kernel/src/arch/x86_64/CPU.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/arch/x86_64/CPU.cpp b/kernel/src/arch/x86_64/CPU.cpp index 3f88e237..04767240 100644 --- a/kernel/src/arch/x86_64/CPU.cpp +++ b/kernel/src/arch/x86_64/CPU.cpp @@ -247,7 +247,7 @@ namespace CPU { StackFrame* current_frame = (StackFrame*)base_pointer; // FIXME: Validate that the frame itself is readable, might span across multiple pages - while (current_frame && MemoryManager::validate_readable_page((u64)current_frame)) + while (current_frame && MemoryManager::validate_readable_page((u64)current_frame) && current_frame->instruction) { callback(current_frame->instruction, arg); current_frame = current_frame->next;