bionic/libc/arch-x86
Jack Ren e480fc83b2 bionic: fix pthread_{create, exit}/signal race condition
(1) in pthread_create:
    If the one signal is received before esp is subtracted by 16 and
    __thread_entry( ) is called, the stack will be cleared by kernel
    when it tries to contruct the signal stack frame. That will cause
    that __thread_entry will get a wrong tls pointer from the stack
    which leads to the segment fault when trying to access tls content.

(2) in pthread_exit
    After pthread_exit called system call unmap(), its stack will be
    freed.  If one signal is received at that time, there is no stack
    available for it.

Fixed by subtracting the child's esp by 16 before the clone system
call and by blocking signal handling before pthread_exit is started.

Author: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-11-29 17:09:51 -08:00
..
bionic bionic: fix pthread_{create, exit}/signal race condition 2011-11-29 17:09:51 -08:00
include NDK: x86 header file has incorrect definition for ptrdiff_t 2011-08-05 08:34:17 -07:00
string Update ATOM string routines to latest 2010-10-11 12:33:58 -07:00
syscalls Add support for the utimensat(2) syscall to bionic. 2011-03-24 18:18:48 -07:00
syscalls.mk Add support for the utimensat(2) syscall to bionic. 2011-03-24 18:18:48 -07:00