Go to file
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
benchmarks Start hiding "private/bionic_time.h". 2014-07-25 12:03:51 -07:00
libc Fix pthread_getattr_np for the main thread. 2014-08-26 10:36:38 -07:00
libdl Turn on -Wunused and fix the mistakes it uncovers. 2014-06-03 15:22:34 -07:00
libm Move the meat of <features.h> into <sys/cdefs.h>. 2014-08-19 11:18:20 -07:00
libstdc++ Hide C++ stuff in libc. Put it back in libstdc++. 2014-08-18 12:01:01 -07:00
linker Bump soinfo version 2014-08-22 13:29:18 -07:00
tests Fix pthread_getattr_np for the main thread. 2014-08-26 10:36:38 -07:00
.gitignore Merge memory checking functionality from sandbox 2010-02-16 11:43:18 -08:00
ABI-bugs.txt PTHREAD_KEYS_MAX cleanup. 2013-12-12 12:51:08 -08:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:11:41 -07:00
CleanSpec.mk Make jemalloc the default choice. 2014-07-11 11:01:30 -07:00
HACKING.txt Rewrite syslog(3) to use Android logging. 2014-07-21 16:56:48 -07:00