1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

Kernel: Make sure we unmap the TLS region when a thread exits

Previously the TLS region would get leaked which was noticible
when creating/destroying a lot of threads and then inspecting
the region map.
This commit is contained in:
Gunnar Beutner 2021-05-28 11:18:58 +02:00 committed by Andreas Kling
parent f63f471b87
commit b9d693665b
2 changed files with 10 additions and 0 deletions

View file

@ -29,6 +29,7 @@
#include <Kernel/ThreadTracer.h>
#include <Kernel/TimerQueue.h>
#include <Kernel/UnixTypes.h>
#include <Kernel/VM/Range.h>
#include <LibC/fd_set.h>
#include <LibC/signal_numbers.h>
@ -1220,6 +1221,7 @@ private:
u32 m_kernel_stack_top { 0 };
OwnPtr<Region> m_kernel_stack_region;
VirtualAddress m_thread_specific_data;
Optional<Range> m_thread_specific_range;
Array<SignalActionData, NSIG> m_signal_action_data;
Blocker* m_blocker { nullptr };