1. 29 Oct, 2014 6 commits
    • Elliott Hughes's avatar
      Merge changes I0feda6b2,I22d13fde,I49d7d09d,Ice490bfe into lmp-mr1-dev · b0693ec5
      Elliott Hughes authored
      * changes:
        Fix the type of u_ar0 in <sys/user.h>.
        Add greg_t for arm64.
        POSIX says <signal.h> gets you ucontext_t.
        Add in_port_t and move it and in_addr_t to the correct header file.
      b0693ec5
    • Elliott Hughes's avatar
      Fix the type of u_ar0 in <sys/user.h>. · 0c4e98ad
      Elliott Hughes authored
      (cherry picked from commit e03950fa)
      
      Bug: 18172268
      Change-Id: I0feda6b253882f68f47bcf30fad998286cc7f620
      0c4e98ad
    • Elliott Hughes's avatar
      Add greg_t for arm64. · d0fb6a29
      Elliott Hughes authored
      This was already present for the other architectures. I think we skipped
      this because glibc seems to have an incorrect definition (int rather than
      long), but the kernel has the sane definition (just not in a uapi header).
      
      (cherry picked from commit 8e4d3710)
      
      Bug: 18172268
      Change-Id: I22d13fdeb6431ea122dd028a229782dcaf2286b2
      d0fb6a29
    • Elliott Hughes's avatar
      POSIX says <signal.h> gets you ucontext_t. · ab4d5cf2
      Elliott Hughes authored
      POSIX also says that ucontext_t's uc_sigmask has type sigset_t.
      
      MIPS64 strace needs this.
      
      The #define is to keep chromium off our lawn; otherwise it tries to redefine
      all this stuff itself. We should probably clean that up and remove the #define.
      
      (cherry picked from commit 26a8eb50)
      
      Bug: 18172268
      Change-Id: I49d7d09dabfc6c6926a8e1f4b235d041e2f2fc4d
      ab4d5cf2
    • Elliott Hughes's avatar
      Add in_port_t and move it and in_addr_t to the correct header file. · eedbf70e
      Elliott Hughes authored
      No one's reported this, but I saw it in an Android port of fuser(1).
      
      We still have lots of problems in our network headers because we
      get most of the structs direct from the kernel, and it doesn't use
      types like this (which is why we've got away without this one for
      so long). One day we should probably look at cleaning that up, but
      doing so can wait.
      
      (cherry picked from commit 35d226e0)
      
      Bug: 18172268
      Change-Id: Ice490bfe84afb04722d738128053d4c533b8a664
      eedbf70e
    • Christopher Ferris's avatar
      Add stpcpy assembler version. · 98d57c95
      Christopher Ferris authored
      For generic, continue to use the C version of the code.
      
      Bug: 13746695
      
      (cherry picked from commit 7d849ac3)
      
      Change-Id: Iae44785f37f9bb59103ab78fb9f74c92f8a95c7f
      98d57c95
  2. 28 Oct, 2014 9 commits
  3. 27 Oct, 2014 6 commits
    • Pavel Chupin's avatar
      [x86,x86_64] Fix libgcc unwinding through signal · 8eb8c392
      Pavel Chupin authored
      
      This change provides __restore/__restore_rt on x86 and __restore_rt on
      x86_64 with unwinding information to be able to unwind through signal
      frame via libgcc provided unwinding interface. See comments inlined for
      more details.
      
      Also remove the test that had a dependency on
      __attribute__((cleanup(foo_cleanup))). It doesn't provide us with any
      better test coverage than we have from the newer tests, and it doesn't
      work well across a variety architectures (presumably because no one uses
      this attribute in the real world).
      
      Tested this on host via bionic-unit-tests-run-on-host on both x86 and
      x86-64.
      
      Bug: 17436734
      Signed-off-by: default avatarPavel Chupin <pavel.v.chupin@intel.com>
      
      (cherry picked from commit 50321e2e)
      
      Change-Id: Iba90e36958b00c7cc7db5eeebf888dc89ce4d619
      8eb8c392
    • Elliott Hughes's avatar
      Stack unwinding unit tests. · 190dce9e
      Elliott Hughes authored
      Bug: 17436734
      
      (cherry picked from commit bee1993a)
      
      Change-Id: I7205a862ba2c3b474e287f5e9c8982cef4610af9
      190dce9e
    • Elliott Hughes's avatar
      Use the kernel's sa_restorer for aarch64. · e5e61a0a
      Elliott Hughes authored
      gdb was happy with what we had, but libgcc and libunwind weren't.
      libgcc is happy with the kernel's restorer (because of the extra nop),
      though libunwind looks like it's going to need code changes regardless.
      
      We could make our restorer more like the kernel's one, but why bother
      when we can just let the kernel supply the canonical one?
      
      Bug: 17436734
      
      (cherry picked from commit 1cff9a89)
      
      Change-Id: Ie13d73fd97395e1979a67c2294e036a97c50000d
      e5e61a0a
    • Elliott Hughes's avatar
      Fix 32-bit arm unwinding through signal frames. · 5054e1a1
      Elliott Hughes authored
      gdb was already okay; libgcc and libunwind need a little extra help.
      
      Bug: 17436734
      
      (cherry picked from commit 148dff3e)
      
      Change-Id: I2cc997017acc57c930284af5264f353656b98c7b
      5054e1a1
    • Elliott Hughes's avatar
      Fix signal trampolines. · 7dc2b7b3
      Elliott Hughes authored
      * LP32 should use sa_restorer too. gdb expects this, and future (>= 3.15) x86
        kernels will apparently stop supporting the case where SA_RESTORER isn't
        set.
      
      * gdb and libunwind care about the exact instruction sequences, so we need to
        modify the code slightly in a few cases to match what they're looking for.
      
      * gdb also cares about the exact function names (for some architectures),
        so we need to use __restore and __restore_rt rather than __sigreturn and
        __rt_sigreturn.
      
      * It's possible that we don't have a VDSO; dl_iterate_phdr shouldn't assume
        that getauxval(AT_SYSINFO_EHDR) will return a non-null pointer.
      
      This fixes unwinding through a signal handler in gdb for all architectures.
      It doesn't fix libunwind for arm and arm64. I'll keep investigating that...
      
      (cherry picked from commit 36f451a6)
      
      Bug: 17436734
      Change-Id: Ic1ea1184db6655c5d96180dc07bcc09628e647cb
      7dc2b7b3
    • Elliott Hughes's avatar
      Disable tzdata in $ANDROID_DATA. · 4c30130a
      Elliott Hughes authored
      Bug: 18139284
      Change-Id: I2670dc1791d635139a5d39a438dc08777439476b
      4c30130a
  4. 24 Oct, 2014 1 commit
  5. 22 Oct, 2014 6 commits
    • Elliott Hughes's avatar
      Update bionic to tzdata2014i. · 8fab8119
      Elliott Hughes authored
      From the release notes:
      
         Changes affecting future time stamps
      
           Pacific/Fiji will observe DST from 2014-11-02 02:00 to
           2015-01-18 03:00.  (Thanks to Ken Rylander for the heads-up.)
           Guess that future years will use a similar pattern.
      
           A new Zone Pacific/Bougainville, for the part of Papua New
           Guinea that plans to switch from UTC+10 to UTC+11 on
           2014-12-28 at 02:00.  (Thanks to Kiley Walbom for the
           heads-up.)
      
         Changes affecting time zone abbreviations
      
           Since Belarus is not changing its clocks even though Moscow
           is, the time zone abbreviation in Europe/Minsk is changing
           from FET to its more-traditional value MSK on 2014-10-26 at
           01:00.  (Thanks to Alexander Bokovoy for the heads-up about
           Belarus.)
      
           The new abbreviation IDT stands for the pre-1976 use of UT+8
           in Indochina, to distinguish it better from ICT (UT+7).
      
         Changes affecting past time stamps
      
           Many time stamps have been corrected for Asia/Ho_Chi_Minh
           before 1976 (thanks to Trần Ngọc Quân for an indirect pointer
           to Trần Tiến Bình's authoritative book).  Asia/Ho_Chi_Minh has
           been added to zone1970.tab, to give tzselect users in Vietnam
           two choices, since north and south Vietnam disagreed after our
           1970 cutoff.
      
           Asia/Phnom_Penh and Asia/Vientiane have been turned into
           links, as they differed from existing zones only for older
           time stamps.  As usual, these changes affect pre-1970 time
           stamps only.  Their old contents have been moved to the
           'backzone' file.
      
      Bug: 18085936
      
      (cherry picked from commit a05c2a2a)
      
      Change-Id: If0253cc1515e1bc98e99c6e24eec797836ca7c27
      8fab8119
    • Christopher Ferris's avatar
    • Christopher Ferris's avatar
    • Christopher Ferris's avatar
      Fix generic __memcpy_chk implementation. · f13e1eb9
      Christopher Ferris authored
      - Clean up the labels (add .L to make them local).
      - Change to using cfi directives.
      - Fix unwinding of the __memcpy_chk fail path.
      
      Bug: 18033671
      
      (cherry pick from commit 7123d437)
      
      Change-Id: Ife93bcbfc1949ef29fc8e2dc515b7120632b82b1
      f13e1eb9
    • Dmitriy Ivanov's avatar
      Rename library_offset to library_fd_offset · 702ab5b3
      Dmitriy Ivanov authored
       replace lseek() and use pread() instead
       add test for library_fd_offset > file_size case
      
      Bug: 17762003
      
      (cherry picked from commit a6c12790)
      
      Change-Id: Ie117c745081ee33d07db5341115ff6c8e98b0dec
      702ab5b3
    • Ying Wang's avatar
      Build dlext_testzip as custom module. · 3c5c720b
      Ying Wang authored
      Use $(BUILD_SYSTEM)/base_rules to build it as custom module, so that
      it's exposed to utilities like mm/mmma etc.
      
      Bug: 17887283
      Bug: 17762003
      
      (cherry picked from commit 667853d4)
      
      Change-Id: I405797d16f20dc09e5d84b93b6727b634db2fc2c
      3c5c720b
  6. 21 Oct, 2014 2 commits
    • Christopher Ferris's avatar
      Fix race condition in timer disarm/delete. · 0724132c
      Christopher Ferris authored
      When setting a repeat timer using the SIGEV_THREAD mechanism, it's possible
      that the callback can be called after the timer is disarmed or deleted.
      This happens because the kernel can generate signals that the timer thread
      will continue to handle even after the timer is supposed to be off.
      
      Add two new tests to verify that disarming/deleting doesn't continue to
      call the callback.
      
      Modify the repeat test to finish more quickly than before.
      
      Refactor the Counter implementation a bit.
      
      Bug: 18039727
      Change-Id: I73192c915cdacf608521b1792c54e5af14a34907
      0724132c
    • Dmitriy Ivanov's avatar
      Add file_offset parameter to android_extinfo · de01780f
      Dmitriy Ivanov authored
      Bug: 17762003
      
      (cherry picked from commit 07e5bc15)
      
      Change-Id: I72d527831384ff5dde013a4c8dfe639fbec165f5
      de01780f
  7. 20 Oct, 2014 1 commit
  8. 13 Oct, 2014 2 commits
  9. 10 Oct, 2014 2 commits
  10. 09 Oct, 2014 3 commits
  11. 08 Oct, 2014 1 commit
  12. 07 Oct, 2014 1 commit
    • Dan Albert's avatar
      Inline helpers need to be exported unmangled. · 55ee845b
      Dan Albert authored
      __open_2() is used by the fortify implementation of open(2) in
      fcntl.h, and as such needs an unmangled C name. For some reason
      (inlining?), this doesn't cause problems at the default optimization
      level, but does for -O0.
      
      The rest of these didn't cause build failures, but they look suspect
      and probably will, we just haven't caught them yet.
      
      (cherry-pick of 658727e1 with conflicts
      in stdio.h and string.h.)
      
      Bug: 17784968
      Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
      55ee845b