1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-05 11:07:34 +00:00

Kernel: Prevent kprintf() from asserting in Console::the() (#718)

This triggered a stack overflow because ubsan can call kprintf() at any
time, even before Console is initialized.
This commit is contained in:
Nicolas Van Bossuyt 2019-11-03 13:17:55 +01:00 committed by Andreas Kling
parent 8216019b2e
commit 81c4dcadf1
3 changed files with 14 additions and 1 deletions

View file

@ -13,6 +13,11 @@ Console& Console::the()
return *s_the;
}
bool Console::is_initialized()
{
return s_the != nullptr;
}
Console::Console()
: CharacterDevice(5, 1)
{