diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-12-11 17:39:52 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-12-12 08:34:19 +0200 |
commit | 31fa3f8b1b78c28c45d0d8183f6f3652ceb52da8 (patch) | |
tree | de421ed2b336aeb2e7457ef8aaf1ce4c987af442 /Kernel | |
parent | 0ca1231d8fafb5d62b17a8e365b44cb1ceeb3498 (diff) | |
download | serenity-31fa3f8b1b78c28c45d0d8183f6f3652ceb52da8.zip |
Kernel: Remove alternative signal stack settings on execve(2)
A successful call to execve(2) removes any existing alternate signal
stack.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Thread.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index 1219c5df3c..e097849b93 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -685,6 +685,9 @@ void Thread::clear_signals() m_pending_signals = 0; m_have_any_unmasked_pending_signals.store(false, AK::memory_order_release); m_signal_action_data.fill({}); + // A successful call to execve(2) removes any existing alternate signal stack + m_alternative_signal_stack = 0; + m_alternative_signal_stack_size = 0; } // Certain exceptions, such as SIGSEGV and SIGILL, put a |