OSDN Git Service

Improve pthread_create failure handling.
authorElliott Hughes <enh@google.com>
Tue, 19 Sep 2017 21:02:50 +0000 (14:02 -0700)
committerElliott Hughes <enh@google.com>
Mon, 2 Oct 2017 23:05:00 +0000 (23:05 +0000)
commit854556c41e20c37b210498b0374415b640104785
treed9e4a3e7a14293d7397d1f5d9690703d55f195f4
parentf2a1b12f2e689c2ef116c955f42c640f5c344487
Improve pthread_create failure handling.

Return EAGAIN rather than aborting if we fail to set up the TLS for a new
thread.

Add a test that uses all the VMAs so we can properly test these edge cases.

Add an explicit test for pthread_attr_setdetachstate, which we use in the
previous test, but other than that has no tests.

Remove support for ro.logd.timestamp/persist.logd.timestamp, which doesn't
seem to be used, and which prevents us from logging failures in cases where
mmap fails (because we need to mmap in the system property implementation).

(cherry picked from commit 53dc9dd70155fd75af744cbebecc563658c69818)

Bug: http://b/65608572
Test: ran tests
Change-Id: I881029d9fd368b8556843e70fdb278fbe51dbfee
Merged-In: I881029d9fd368b8556843e70fdb278fbe51dbfee
libc/async_safe/async_safe_log.cpp
libc/bionic/__libc_init_main_thread.cpp
libc/bionic/pthread_create.cpp
libc/bionic/pthread_internal.h
tests/pthread_test.cpp