Kernel: Stop stacktrace dump on null bp

This makes stack traces not crash before IDT is initialized
This commit is contained in:
2026-05-02 15:51:12 +03:00
parent d2b9b49cb0
commit 8869cc7b8c

View File

@@ -69,7 +69,7 @@ namespace Debug
else for (size_t depth = 0; depth < 64; depth++) else for (size_t depth = 0; depth < 64; depth++)
{ {
BAN::Formatter::print(Debug::putchar, " {}\r\n", reinterpret_cast<void*>(frame.ip)); BAN::Formatter::print(Debug::putchar, " {}\r\n", reinterpret_cast<void*>(frame.ip));
if (!safe_user_memcpy(&frame, frame.bp, sizeof(stackframe))) if (frame.bp == nullptr || !safe_user_memcpy(&frame, frame.bp, sizeof(stackframe)))
break; break;
} }