1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

Kernel: Fix bug in Thread::dispatch_signal().

dispatch_signal() expected a RegisterDump on the kernel stack. However
in certain cases, like just after a clone, this was not the case and
dispatch_signal() would instead write to an incorrect user stack pointer.

We now use the threads TSS in situations where the RegisterDump may not
be valid, fixing the issue.
This commit is contained in:
Drew Stratford 2019-11-04 21:29:47 +13:00 committed by Andreas Kling
parent 44f22c99ef
commit 5efbb4ae95
2 changed files with 47 additions and 41 deletions

View file

@ -294,7 +294,6 @@ public:
void set_has_used_fpu(bool b) { m_has_used_fpu = b; }
void set_default_signal_dispositions();
void push_value_on_user_stack(RegisterDump&, u32);
void push_value_on_stack(u32);
void make_userspace_stack_for_main_thread(Vector<String> arguments, Vector<String> environment);
void make_userspace_stack_for_secondary_thread(void* argument);