mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
Kernel: Ignore allocation failures when appending threads to coredump
We shouldn't panic due to a failure in coredump generation
This commit is contained in:
parent
d1433c35b0
commit
1abbe9b02c
Notes:
sideshowbarker
2024-07-17 20:11:59 +09:00
Author: https://github.com/IdanHo
Commit: 1abbe9b02c
Pull-request: https://github.com/SerenityOS/serenity/pull/12128
Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 3 additions and 1 deletions
|
@ -659,7 +659,9 @@ void Process::die()
|
|||
|
||||
VERIFY(m_threads_for_coredump.is_empty());
|
||||
for_each_thread([&](auto& thread) {
|
||||
m_threads_for_coredump.append(thread);
|
||||
auto result = m_threads_for_coredump.try_append(thread);
|
||||
if (result.is_error())
|
||||
dbgln("Failed to add thread {} to coredump due to OOM", thread.tid());
|
||||
});
|
||||
|
||||
all_instances().with([&](const auto& list) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue