aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-09-28 07:26:35 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-09-28 07:26:35 +0000
commit1ec3ea35f4bda556f8a2201ce4573a859271769a (patch)
treeb534185587562a687124834f1b443cd42e694ec1
parentcb26c62ae5030c0f1b96e34edc4e06dbff8a34ad (diff)
parentf2a1b12f2e689c2ef116c955f42c640f5c344487 (diff)
downloadbionic-1ec3ea35f4bda556f8a2201ce4573a859271769a.tar.gz
release-request-ca7a0f27-e01e-4493-95dc-73b265f88cc9-for-git_oc-mr1-release-4365318 snap-temp-L33600000106883904
Change-Id: I1433ee623ac372956bb8a345bfc4206b602ef8ad
-rw-r--r--libc/bionic/pthread_create.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index 9197aa3fe..ff972c3ec 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -59,13 +59,13 @@ void __init_tls(pthread_internal_t* thread) {
size_t allocation_size = BIONIC_TLS_SIZE + 2 * PAGE_SIZE;
void* allocation = mmap(nullptr, allocation_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (allocation == MAP_FAILED) {
- async_safe_fatal("failed to allocate TLS");
+ async_safe_fatal("failed to allocate TLS: %s", strerror(errno));
}
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, allocation, allocation_size, "bionic TLS guard page");
thread->bionic_tls = reinterpret_cast<bionic_tls*>(static_cast<char*>(allocation) + PAGE_SIZE);
if (mprotect(thread->bionic_tls, BIONIC_TLS_SIZE, PROT_READ | PROT_WRITE) != 0) {
- async_safe_fatal("failed to mprotect TLS");
+ async_safe_fatal("failed to mprotect TLS: %s", strerror(errno));
}
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, thread->bionic_tls, BIONIC_TLS_SIZE, "bionic TLS");
}