[Bug 253337] Linuxulator: glibc's pthread_getattr_np reports stack size as 124K
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Feb 13 16:44:49 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253337
--- Comment #5 from Conrad Meyer <cem at freebsd.org> ---
Ok, here's what's going on:
Our rlimit value (cur) is fine; same as glibc (8MB).
Glibc is parsing /proc/self/maps to limit the pthread "stack size" based on
adjacent mappings, *which it assumes cannot be part of the stack*. In FreeBSD,
we actually have explicit no-access mapping for the region the stack can grow
into (rlim_max):
00007fffdffff000-00007ffffffdf000 ---p 00000000 00:00 0
00007ffffffdf000-00007ffffffff000 rw-p 00000000 00:00 0 [stack]
I.e., that earlier mapping also corresponds to the stack.
Linux doesn't do this, or doesn't report it in /proc/self/maps.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-emulation
mailing list