platform_bionic/libc/arch-x86
Elliott Hughes 57b7a6110e Fix pthread_getattr_np for the main thread.
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
2014-08-26 10:36:38 -07:00
..
atom libc: Fix 'index' symbol export. 2014-06-16 13:10:20 -07:00
bionic Fix pthread_getattr_np for the main thread. 2014-08-26 10:36:38 -07:00
generic Remove the unused swab.S. 2014-07-22 20:21:31 -07:00
include/machine Simplify _ALIGN_TEXT. 2014-08-20 13:11:58 -07:00
silvermont Regenerate the bionic NOTICE files. 2014-07-07 15:42:06 -07:00
syscalls Make __set_errno hidden in asm. 2014-08-08 15:35:47 -07:00
x86.mk Fix pthread_getattr_np for the main thread. 2014-08-26 10:36:38 -07:00