57b7a6110e
On most architectures the kernel subtracts a random offset to the stack pointer in create_elf_tables by calling arch_align_stack before writing the auxval table and so on. On all but x86 this doesn't cause a problem because the random offset is less than a page, but on x86 it's up to two pages. This means that our old technique of rounding the stack pointer doesn't work. (Our old implementation of that technique was wrong too.) It's also incorrect to assume that the main thread's stack base and size are constant. Likewise to assume that the main thread has a guard page. The main thread is not like other threads. This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK) whenever we're asked. Bug: 17111575 Signed-off-by: Fengwei Yin <fengwei.yin@intel.com> Change-Id: I1d4dbffe7bc7bda1d353c3a295dbf68d29f63158 |
||
---|---|---|
.. | ||
__get_tls.h | ||
bionic_asm.h | ||
bionic_atomic_arm.h | ||
bionic_atomic_arm64.h | ||
bionic_atomic_gcc_builtin.h | ||
bionic_atomic_inline.h | ||
bionic_atomic_mips.h | ||
bionic_atomic_x86.h | ||
bionic_auxv.h | ||
bionic_config.h | ||
bionic_futex.h | ||
bionic_macros.h | ||
bionic_mbstate.h | ||
bionic_prctl.h | ||
bionic_pthread.h | ||
bionic_ssp.h | ||
bionic_string_utils.h | ||
bionic_systrace.h | ||
bionic_time.h | ||
bionic_time_conversions.h | ||
bionic_tls.h | ||
ErrnoRestorer.h | ||
kernel_sigset_t.h | ||
KernelArgumentBlock.h | ||
libc_events.h | ||
libc_logging.h | ||
NetdClientDispatch.h | ||
ScopedFd.h | ||
ScopedPthreadMutexLocker.h | ||
ScopedReaddir.h | ||
thread_private.h | ||
ThreadLocalBuffer.h |