1. 02 Sep, 2014 1 commit
    • Hans Boehm's avatar
      Fix, generalize stdatomic.h; improve test. · c8cf3513
      Hans Boehm authored
      We seem to use this stdatomic.h sometimes, and slightly different prebuilts
      at other times, making them all difficult to test, and making it unclear
      which one we're testing.  This generalizes the bionic header so that it
      can be used directly as the prebuilt header as well.  So long as they
      don't diverge again, that should somewhat improve test coverage.
      
      Use the correct builtin for atomic_is_lock_free.
      
      Fix atomic_flag_init.
      
      Turn on atomic tests even with __GLIBC__, since they now appear to pass.
      
      Include uchar.h in stdatomic.h where needed.
      
      Add a basic memory ordering test.
      
      Fix bit-rotted comments in bionic tests makefile.
      
      Prerequisite for fixing b/16880454 and
      
      Bug:16513433
      
      Change-Id: If6a14c1075b379395ba5d93357d56025c0ffab68
      (cherry picked from commit 00aaea36)
      c8cf3513
  2. 01 Sep, 2014 1 commit
  3. 29 Aug, 2014 2 commits
  4. 27 Aug, 2014 6 commits
  5. 26 Aug, 2014 2 commits
    • Christopher Ferris's avatar
      Use the default unwind code. · 3f7635f4
      Christopher Ferris authored
      This speeds up the debug malloc code by using the original unwinding code.
      The only catch is that it has to link in the libc++ arm unwind code or
      there will be crashes when attempting to unwind through libc++ compiled
      code.
      
      Bug: 16874447
      Change-Id: Ifdbbcbd4137d668b25cf3c2bd59535e06ebfa5a7
      3f7635f4
    • Elliott Hughes's avatar
      Fix pthread_getattr_np for the main thread. · 64218234
      Elliott Hughes authored
      
      On most architectures the kernel subtracts a random offset to the stack
      pointer in create_elf_tables by calling arch_align_stack before writing
      the auxval table and so on. On all but x86 this doesn't cause a problem
      because the random offset is less than a page, but on x86 it's up to two
      pages. This means that our old technique of rounding the stack pointer
      doesn't work. (Our old implementation of that technique was wrong too.)
      
      It's also incorrect to assume that the main thread's stack base and size
      are constant. Likewise to assume that the main thread has a guard page.
      The main thread is not like other threads.
      
      This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK)
      whenever we're asked.
      
      Bug: 17111575
      Signed-off-by: default avatarFengwei Yin <fengwei.yin@intel.com>
      
      (cherry picked from commit 57b7a611)
      
      Change-Id: I87e679ee1c0db8092f2d1221c8e7c1461545c5a4
      64218234
  6. 22 Aug, 2014 1 commit
    • Elliott Hughes's avatar
      Fix unistd.getpid_caching_and_clone. · 84d0683a
      Elliott Hughes authored
      This test only works if you're root (strictly: if you have permission to
      CLONE_NEWNS), so it's useful to us when we're doing ad hoc testing (since
      that's usually done as root), but it's not useful as part of CTS or when
      running the tests on the host.
      
      Bug: 16705621
      Bug: 17170200
      Change-Id: Ia92c871b15f7e45fc174bb59bc95540fd00ae745
      84d0683a
  7. 20 Aug, 2014 1 commit
  8. 19 Aug, 2014 1 commit
    • Dan Albert's avatar
      Expose android_set_abort_message(). · 1506fc17
      Dan Albert authored
      Removes the leading underscores from __android_set_abort_message() and
      moves its declaration into a public header file.
      
      Bug: 17059126
      Change-Id: I470c79db47ec783ea7a54b800f8b78ecbe7479ab
      (cherry picked from commit ce6b1abb)
      (cherry picked from commit 3a25ab95)
      1506fc17
  9. 18 Aug, 2014 3 commits
  10. 16 Aug, 2014 2 commits
  11. 15 Aug, 2014 3 commits
    • Dmitriy Ivanov's avatar
      d8e00769
    • Dmitriy Ivanov's avatar
      Keep symbols for linker · be4348e7
      Dmitriy Ivanov authored
      Bug: 17011146
      
      (cherry picked from commit ad5e8b50)
      
      Change-Id: Ib1d3f8d6d38af98586658e01ed1ec79d2c5b4d42
      be4348e7
    • Hans Boehm's avatar
      Have stdatomic.h punt to C++ atomic when possible · f0f66c02
      Hans Boehm authored
      This is an alternate, somewhat simpler, fix that makes it safe to
      include both <atomic> and <stdatomic.h> from C++ code in either order.
      It means that C code consistently uses one implementation of atomics
      and C++ another.  We still have to make sure that those two
      implementations interoperate correctly at runtime; in particular,
      any flavor of atomic object needs to be represented exactly like the
      underlying type, with the proper alignment constraint.
      
      Bug:17007799
      Change-Id: Iffcfc5220d8fa150f89dd083a121b24d23f268fc
      (cherry picked from commit 019d3958)
      f0f66c02
  12. 14 Aug, 2014 7 commits
  13. 13 Aug, 2014 1 commit
    • Dmitriy Ivanov's avatar
      Optimize symbol lookup · 8a84d383
      Dmitriy Ivanov authored
       Do not run symbol lookup on already visited soinfos
       Not taking into account already visited libraries
       dramatically slows down dlsym in cases when there
       are multiple occurrences of a large library in
       dependency tree.
      
      Bug: 16977077
      
      (cherry picked from commit 042426ba)
      
      Change-Id: I69d59e395e8112f119343e8a4d72fe31cd449f31
      8a84d383
  14. 12 Aug, 2014 1 commit
    • Dan Albert's avatar
      Hide __libc_malloc_dispatch. · d332bc68
      Dan Albert authored
      Now that -Bsymbolic is fixed, we can hide __libc_malloc_dispatch without
      breaking ASAN.
      
      Bug: 11156955
      Change-Id: Ia2fc9b046a74e666b33aa6c6c5435f70a63b8021
      d332bc68
  15. 10 Aug, 2014 1 commit
    • Elliott Hughes's avatar
      Fix our x86 PIC_PROLOGUE. · 72d7e667
      Elliott Hughes authored
      The old definition only worked for functions that didn't use numbered
      local labels. Upstream uses '666' not only as some kind of BSD in-joke,
      but also because there's little likelihood of any function having
      labels that high.
      
      There's a wider question about whether we actually want to go via the
      PLT at all in this code, but that's a question for another day.
      
      Bug: 16906712
      Change-Id: I3cd8ecc448b33f942bb6e783931808ef39091489
      72d7e667
  16. 09 Aug, 2014 1 commit
  17. 08 Aug, 2014 2 commits
  18. 07 Aug, 2014 1 commit
    • Elliott Hughes's avatar
      Android is all-PIC/PIE. · 43227c0b
      Elliott Hughes authored
      Clean up the x86/x86_64 assembler. The motivator (other than reducing
      confusion) was that asm.h incorrectly checked PIC rather than __PIC__.
      
      Bug: 16823325
      
      (cherry picked from commit 6b6364a7)
      
      Change-Id: I89ca57fa0eb34a36de6cb11ea85f71054fce709d
      43227c0b
  19. 06 Aug, 2014 1 commit
  20. 07 Aug, 2014 1 commit
    • Christopher Ferris's avatar
      Do a second key cleanup in pthread_exit. · 18d93f27
      Christopher Ferris authored
      During pthread_exit, the keys are cleaned. Unfortunately, a call to
      free occurs after the cleanup and the memory for some of the keys
      is recreated when using jemalloc. The solution is to do the key
      cleanup twice.
      
      Also, modify the pthread_detach__leak test to be less flaky
      when run on a jemalloc system.
      
      Bug: 16513133
      Change-Id: Ic17e8344bdc1ba053c4f5b6d827a4c19c57860c1
      18d93f27
  21. 06 Aug, 2014 1 commit