diff options
author | Christophe Lyon <christophe.lyon@st.com> | 2018-07-04 17:55:38 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbrodkorb@conet.de> | 2018-08-10 16:02:45 +0200 |
commit | 13fcd46ea7d2d93858061748d6428b900150f6ad (patch) | |
tree | d2b2fd5c5553ae759abdca6df97ae48edf8afb99 /libc/sysdeps/linux/common/swapon.c | |
parent | 606a8b28e4987e09572dd0c6b40546cdcbcc1bf7 (diff) |
nptl: Clear TLS area for static binaries.
busybox init checks it has pid 1, but getpid() returns another value
when building busybox statically. This is because the corresponding
area is not cleared when allocated (it is allocated with
MAP_UNINITIALIZED, whose behavior depends on the Linux kernel's
CONFIG_MMAP_ALLOW_UNINITIALIZED).
This patch fixes the problem by explicitly clearing the memory area.
* libpthread/nptl/sysdeps/generic/libc-tls.c (__libc_tls_setup):
Clear tlsblock.
Signed-off-by: Mickaël Guêné <mickael.guene@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
Diffstat (limited to 'libc/sysdeps/linux/common/swapon.c')
0 files changed, 0 insertions, 0 deletions