mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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:
parent
8216019b2e
commit
81c4dcadf1
Notes:
sideshowbarker
2024-07-19 11:27:10 +09:00
Author: https://github.com/sleepy-monax
Commit: 81c4dcadf1
Pull-request: https://github.com/SerenityOS/serenity/pull/718
Reviewed-by: https://github.com/awesomekling
3 changed files with 14 additions and 1 deletions
|
@ -13,6 +13,11 @@ Console& Console::the()
|
|||
return *s_the;
|
||||
}
|
||||
|
||||
bool Console::is_initialized()
|
||||
{
|
||||
return s_the != nullptr;
|
||||
}
|
||||
|
||||
Console::Console()
|
||||
: CharacterDevice(5, 1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue