mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:37:34 +00:00
LibC: Don't format strings when asserting with an unstable heap
If we hit an assertion while the heap isn't in a stable state, we can't rely on dynamic memory allocation because the malloc mutex is already held and the heap is most likely corrupted. Instead, we need to bail out fast before we make the situation even worse.
This commit is contained in:
parent
e215580147
commit
8043fcd466
3 changed files with 13 additions and 4 deletions
|
@ -18,6 +18,7 @@ extern void __stdio_init();
|
|||
extern void _init();
|
||||
extern bool __environ_is_malloced;
|
||||
extern bool __stdio_is_initialized;
|
||||
extern bool __heap_is_stable;
|
||||
|
||||
int __cxa_atexit(AtExitFunction exit_function, void* parameter, void* dso_handle);
|
||||
void __cxa_finalize(void* dso_handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue