mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
Kernel: Don't send crash signal to process itself when it has no handler
If there's nobody listening for the crash signal, fall back to the normal crash path where we get some debug output about what happened. Thanks to Idan for suggesting the fix.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 20:17:57 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e04e52186d5
@@ -220,7 +220,7 @@ void handle_crash(RegisterState const& regs, char const* description, int signal
|
||||
PANIC("{} with !Thread::current()", description);
|
||||
|
||||
auto crashed_in_kernel = (regs.cs & 3) == 0;
|
||||
if (!crashed_in_kernel && !current_thread->should_ignore_signal(signal) && !current_thread->is_signal_masked(signal)) {
|
||||
if (!crashed_in_kernel && current_thread->has_signal_handler(signal) && !current_thread->should_ignore_signal(signal) && !current_thread->is_signal_masked(signal)) {
|
||||
current_thread->send_urgent_signal_to_self(signal);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user