OSDN Git Service

Initialize main thread TLS before the global stack guard.
authorJosh Gao <jmgao@google.com>
Fri, 2 Sep 2016 05:58:44 +0000 (22:58 -0700)
committerJosh Gao <jmgao@google.com>
Tue, 6 Sep 2016 19:12:19 +0000 (12:12 -0700)
commit4159e866ab7b2397e714d7a1b309c5e6719c4620
tree82b27430fff08a08a81d94d9b5283fdc1d6d63fe
parentbfad958982a6b1c8c957c0eb951826d0c369eedd
Initialize main thread TLS before the global stack guard.

The GCE breakage caused by 78a52f19bb207d1c736f1d5362e01f338d78645 was
due to TLS_SLOT_SELF being uninitialized before the use of errno by
syscall. Separate stack guard initialization from TLS initialization so
that stack guard initialization can make syscalls.

Bug: http://b/29622562
Bug: http://b/31251721
Change-Id: Id0e4379e0efb7194a2df7bd16211ff11c6598033
libc/bionic/__libc_init_main_thread.cpp
libc/bionic/pthread_create.cpp