platform_bionic/libc/bionic
Bjorn Andersson 0753dc653e pthread: Invalidate stale stack pointers on pthread_exit()
A call to pthread_key_delete() after pthread_exit() have unmapped the stack of a thread
but before the ongoing pthread_join() have finished executing will result in an access
to unmapped memory.
Avoid this by invalidating the stack_base and tls pointers during pthread_exit().

This is based on the investigation and proprosed solution by
Srinavasa Nagaraju <srinavasa.x.nagaraju@sonyericsson.com>

Change-Id: I145fb5d57930e91b00f1609d7b2cd16a55d5b3a9
2012-05-08 17:43:57 -07:00
..
__errno.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
__set_errno.c __set_errno: Hide internal symbol __set_syscall_errno 2010-10-15 03:07:22 +08:00
arc4random.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
atomics_x86.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
basename.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
basename_r.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
bionic_clone.c Implement clone() C library function properly. 2010-01-25 11:18:30 -08:00
clearenv.c Change-Id: I68cc462aeb2460345a53bdb9941ce4bfc10456fb 2010-06-27 20:53:04 -07:00
cpuacct.c Prevent deadlock when using fork 2011-12-06 08:39:18 -08:00
dirname.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
dirname_r.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
dlmalloc.c Add the posix_memalign(3) function to bionic 2012-04-27 09:34:53 -07:00
dlmalloc.h Split libc_debug.so into two .so modules loaded on demand from libc.so 2009-11-18 10:36:25 -08:00
drand48.c Remove duplicated _rand48 implementation. Use stdlib version instead 2010-10-25 16:27:47 -07:00
erand48.c Remove duplicated _rand48 implementation. Use stdlib version instead 2010-10-25 16:27:47 -07:00
err.c Add fts, err, and sys/queue for grep 2010-01-15 15:57:02 -08:00
fdprintf.c Add implementation of fdprintf, clearenv, and stubs for ttyname_r, *usershell 2010-01-15 16:52:35 -08:00
fork.c bionic: Fix wrong kernel_id in pthread descriptor after fork() 2012-03-12 23:14:56 +08:00
fts.c Remove compiler warnings when building Bionic. 2010-06-22 17:51:41 -07:00
hash.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
if_indextoname.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
if_nametoindex.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
ioctl.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
ldexp.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
libc_init_common.c am 1df986c2: libc: fix executable destruction support. 2010-10-21 09:43:19 -07:00
libc_init_common.h Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list 2011-07-07 22:46:16 +02:00
libc_init_dynamic.c am 1df986c2: libc: fix executable destruction support. 2010-10-21 09:43:19 -07:00
libc_init_static.c Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list 2011-07-07 22:46:16 +02:00
logd_write.c Revert "Revert "libc: Add logcat error message for memory corruption"" 2011-07-06 12:58:56 -07:00
malloc_debug_common.c removing shadowing redeclaration of result 2011-03-22 15:35:40 +01:00
malloc_debug_common.h Merge memory checking functionality from sandbox 2010-02-16 11:43:18 -08:00
malloc_debug_leak.c bionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign() 2012-05-07 10:50:21 -07:00
malloc_debug_qemu.c Merge memory checking functionality from sandbox 2010-02-16 11:43:18 -08:00
md5.c am 08a4ce98: am 0c398985: Merge "[ENDIAN] Build md5 code correctly for bigendian targets" 2011-03-14 11:50:56 -07:00
md5.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
memmove_words.c Add some missing includes. 2011-03-21 20:01:03 -07:00
pthread-atfork.c bionic: fix atfork hanlder_mutex deadlock 2012-03-17 17:08:54 +08:00
pthread-rwlocks.c Add pthread_rwlock_t implementation to the C library (DO NOT MERGE) 2010-05-19 14:53:18 -07:00
pthread-timers.c pthread-timers: Hide internal symbol __timer_table_start_stop 2010-10-15 02:28:22 +08:00
pthread.c pthread: Invalidate stale stack pointers on pthread_exit() 2012-05-08 17:43:57 -07:00
pthread_internal.h Let pthread_create fail if schedparam can't be set 2012-05-08 10:54:51 -07:00
ptrace.c bionic, libthread_db x86 fixes 2011-07-07 22:46:16 +02:00
pututline.c bionic: ftell() returns a long, not an int 2010-02-05 16:05:52 -02:00
realpath.c Use a modern chdir(2)-free realpath(3) implementation. 2010-11-04 17:53:06 -07:00
rules.jam auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
sched_cpualloc.c <sched.h>: Add sched_getcpu() and cpu_set_t 2010-12-06 13:42:54 +01:00
sched_cpucount.c <sched.h>: Add sched_getcpu() and cpu_set_t 2010-12-06 13:42:54 +01:00
sched_getaffinity.c <sched.h>: Add sched_getcpu() and cpu_set_t 2010-12-06 13:42:54 +01:00
sched_getcpu.c <sched.h>: Add sched_getcpu() and cpu_set_t 2010-12-06 13:42:54 +01:00
semaphore.c libc: Fix sem_post() implementation to wake up all waiting threads. 2010-07-02 15:09:57 -07:00
sha1.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
ssp.c bionic: equalize the <unknown> program name between ssp.c and libc_init_common.c 2010-02-05 17:48:07 -02:00
stubs.c Implement getpwnam_r(3) and getpwuid_r(3). 2011-05-27 00:52:21 -07:00
system_properties.c Ignore property set timeouts. 2011-04-01 10:53:12 -07:00
thread_atexit.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
time64.c time64: make helper functions static 2010-10-15 02:16:16 +08:00
time64_config.h <time.h>: Add timegm(), timelocal() and others. 2010-12-06 12:25:52 +01:00
utime.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
utmp.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00