blob: fecee485f8db25c4a1f1012388557ecaf789bef0 (
plain) (
blame)
1
2
3
4
5
|
Stop using MAP_GROWSDOWN
Due to how virtual address range growing works on Linux. We are leaking memory if a thread /ever/ manages to grow the stack.
This is due our munmap tracking never getting notified of the new address range on grow, thus when we munmap, we will only munmap the ORIGINAL mapping. Not the new pages that grew. Leaving stale pages around.
We either need to switch to manual page growing in userspace, or on every munmap of a MAP_GROWS region, we need to check `/proc/self/maps` to get the real range.
|