platform_bionic/libc/private
Josh Gao 5e2285d3cc Allocate thread local buffers in __init_tls.
Thread local buffers were using pthread_setspecific for storage with
lazy initialization. pthread_setspecific shares TLS slots between the
linker and libc.so, so thread local buffers being initialized in a
different order between libc.so and the linker meant that bad things
would happen (manifesting as snprintf not working because the
locale was mangled)

Bug: http://b/20464031
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests
      everything passes
Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests
      thread_local tests are failing both before and after (KUSER_HELPERS?)
Test: /data/nativetest64/bionic-unit-tests-static/bionic-unit-tests-static
      no additional failures
Change-Id: I9f445a77c6e86979f3fa49c4a5feecf6ec2b0c3f
2017-02-22 16:05:03 -08:00
..
__get_tls.h AArch64: Add initial support for AArch64 2013-12-16 17:00:22 -08:00
bionic_arc4random.h Add __libc_arc4random_unlimited_entropy. 2016-11-29 15:26:08 -08:00
bionic_asm.h Replace .align with .balign for clarity 2016-10-27 05:11:56 -07:00
bionic_auxv.h Switch <elf.h> over to linux uapi under the covers. 2014-02-10 18:22:24 -08:00
bionic_config.h Use a separate config.h for config like defines. 2014-06-16 23:35:53 -07:00
bionic_constants.h Add semaphore tests, fix sem_destroy. 2014-09-19 17:37:06 -07:00
bionic_errdefs.h Move <sys/_sigdefs.h> and <sys/_errdefs.h> to private. 2016-04-13 17:45:39 -07:00
bionic_fortify.h Improve FORTIFY failure diagnostics. 2016-02-26 22:06:17 -08:00
bionic_futex.h Use FUTEX_WAIT_BITSET to avoid converting timeouts. 2015-11-19 13:42:03 -08:00
bionic_globals.h Only initialize the global stack protector once. 2016-06-30 12:58:32 -07:00
bionic_ieee.h Fix instances of '#if __LP64__'. 2016-09-15 14:21:28 -07:00
bionic_lock.h Merge "Use FUTEX_WAIT_BITSET to avoid converting timeouts." 2015-11-21 01:50:29 +00:00
bionic_macros.h Runtime support for CFI 2017-01-18 13:13:52 -08:00
bionic_malloc_dispatch.h Export malloc_iterate and friends 2016-02-18 15:05:38 -08:00
bionic_mbstate.h Adds functionality specified by uchar.h 2014-06-04 08:39:24 -07:00
bionic_page.h Move PAGE_MASK into <sys/user.h>. 2015-07-28 14:58:37 -07:00
bionic_prctl.h Label pages mapped by linker_allocator 2014-08-11 09:22:48 -07:00
bionic_sdk_version.h Revert "Revert "Make sem_wait able to return errno EINTR for sdk > 23."" 2016-01-25 17:39:18 -08:00
bionic_sigdefs.h Move <sys/_sigdefs.h> and <sys/_errdefs.h> to private. 2016-04-13 17:45:39 -07:00
bionic_ssp.h Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces. 2013-02-14 14:37:34 -08:00
bionic_string_utils.h Fix pthread_getattr_np for the main thread. 2014-08-26 10:36:38 -07:00
bionic_systrace.h Hide ScopedTrace. 2014-08-13 11:25:01 -07:00
bionic_time_conversions.h Make it harder to use a broken legacy function by accident. 2016-04-04 16:15:37 -07:00
bionic_tls.h Allocate thread local buffers in __init_tls. 2017-02-22 16:05:03 -08:00
bionic_vdso.h Support 32-bit ARM vdso. 2016-07-12 13:55:51 -07:00
CFIShadow.h Runtime support for CFI 2017-01-18 13:13:52 -08:00
ErrnoRestorer.h Bring in google3-style DISALLOW_* macros. 2014-05-09 19:12:08 -07:00
get_cpu_count_from_string.h Fix the way to count online cpus. 2015-09-29 17:49:37 -07:00
grp_pwd.h Allocate thread local buffers in __init_tls. 2017-02-22 16:05:03 -08:00
icu.h Fix icu4c calling on x86. 2016-12-08 15:16:37 -08:00
kernel_sigset_t.h Move some pthread functions to signal.h. 2014-11-21 10:26:09 -08:00
KernelArgumentBlock.h Tidy up KernelArgumentBlock::getauxval. 2016-01-05 16:29:33 -08:00
libc_logging.h Add __libc_format_buffer_va_list. 2017-02-15 16:10:37 -08:00
NetdClientDispatch.h Mark sockets on creation (socket()) and accept4(). 2014-05-19 15:19:16 -07:00
ScopedPthreadMutexLocker.h Explicitly disallow default c-tor 2015-12-01 16:57:19 -08:00
ScopedReaddir.h Implement scandirat and scandirat64. 2015-10-27 13:47:36 -07:00
ScopeGuard.h Refactoring: C++11 style DISABLE_ bionic marcos 2014-09-08 17:51:31 -07:00
thread_private.h Defer registration of the arc4random fork-detect handler. 2016-06-28 15:52:59 -07:00
WriteProtected.h Move VDSO pointers to a shared globals struct. 2015-10-09 15:59:04 -07:00