Commit Graph

15755 Commits

Author SHA1 Message Date
Josh Gao c433a36fb5 Merge "Move malloc dispatch table to __libc_globals." 2015-10-14 23:47:41 +00:00
Josh Gao 36ebee4f49 am 198d13e8: Merge "make mmap fail on requests larger than PTRDIFF_MAX"
* commit '198d13e8c25e69f7dbda3f5e1a3258b13fe8db5d':
  make mmap fail on requests larger than PTRDIFF_MAX
2015-10-14 02:21:04 +00:00
Josh Gao 198d13e8c2 Merge "make mmap fail on requests larger than PTRDIFF_MAX" 2015-10-14 02:17:10 +00:00
Dimitry Ivanov 090278d6c6 am 11c2179d: Merge "Log dlopen failures caused by text relocations"
* commit '11c2179d468bba3336c3a3e8418ddaa98f58afce':
  Log dlopen failures caused by text relocations
2015-10-13 22:53:03 +00:00
Dimitry Ivanov 11c2179d46 Merge "Log dlopen failures caused by text relocations" 2015-10-13 22:50:05 +00:00
Dmitriy Ivanov fae39d2bf9 Log dlopen failures caused by text relocations
Some apps will fail to load native libraries with
text relocations when switching target sdk version to M.
It could be hard to diagnose because some of them
suppress dlerror and/or UnsatisfiedLinkError.

This change unconditionally logs the error message making
the cause of the failure more visible to developers.

Bug: http://b/24876001
Change-Id: I0477a0d1307d0879000f3a3a43b974b4cf34bdb2
(cherry picked from commit f32b689d3d)
2015-10-13 15:48:57 -07:00
Dimitry Ivanov 5db60c04c6 am 30cd7065: Merge "Correctly resolve realpath for absolute paths"
* commit '30cd7065b6cd37342e23904cb512c409b8bbd4f1':
  Correctly resolve realpath for absolute paths
2015-10-13 20:43:36 +00:00
Dimitry Ivanov 30cd7065b6 Merge "Correctly resolve realpath for absolute paths" 2015-10-13 20:37:55 +00:00
Dmitriy Ivanov 5dce8948b6 Replace auto -> const auto&/auto&&
Change-Id: Ie484e5a296b5dd222a9545d8539d40d97a6c158c
2015-10-13 12:14:16 -07:00
Lazar Trsic 6f2d3104c8 Correctly resolve realpath for absolute paths
Introduced by: https://android-review.googlesource.com/174475

Change-Id: I44e00040b28be167d5141454f919340afec6084e
2015-10-13 10:57:41 -07:00
Neil Fuller 12b4f21e19 am fb7f45b6: Merge "Update timezone data to 2015g"
* commit 'fb7f45b6a3242c9a9a547705de08cf59e6b7f935':
  Update timezone data to 2015g
2015-10-13 09:14:17 +00:00
Neil Fuller fb7f45b6a3 Merge "Update timezone data to 2015g" 2015-10-13 08:26:44 +00:00
Dimitry Ivanov 5a805d919c am a5ad727e: Merge "linker: Switch to clang"
* commit 'a5ad727e7619f4497792d67ae05b8ef15315b362':
  linker: Switch to clang
2015-10-13 01:40:49 +00:00
Dimitry Ivanov a5ad727e76 Merge "linker: Switch to clang" 2015-10-13 01:34:59 +00:00
Dmitriy Ivanov b28ffc7744 linker: Switch to clang
x86_64 gcc exports malloc/free and co functions because they
are defined with visibility "default" somewhere in gcc builtins;
and vector d-tors for some reason. Switching to clang fixes
this problem.

Bug: http://b/24785482
Change-Id: I741503b4b446523e7ff3fb16de13ed99991fd0c0
2015-10-12 18:20:26 -07:00
Josh Gao 3c8fc2fea9 Move malloc dispatch table to __libc_globals.
Change-Id: Ic20b980d1e8b6c2d4b773ebe336658fd17c737cb
2015-10-12 17:54:58 -07:00
Elliott Hughes fb8fd5076e Opt Brillo out of the ndk cruft.
Bug: http://b/24812426
Change-Id: I6a858d8ceebce9e2285e5b12de9fd89d2b42b352
2015-10-12 17:53:48 -07:00
Elliott Hughes 452ab8f7e3 am 25cba7df: Merge "Make struct FILE opaque."
* commit '25cba7df5120a32b144769843781442031fc597b':
  Make struct FILE opaque.
2015-10-12 20:40:41 +00:00
Elliott Hughes 25cba7df51 Merge "Make struct FILE opaque." 2015-10-12 20:33:04 +00:00
Elliott Hughes f0141dfab1 Make struct FILE opaque.
Bug: http://b/24807045
Change-Id: I3cb4e436325a65bef3b203e3970e4d967101fcce
2015-10-12 12:53:42 -07:00
Elliott Hughes 7c585f2b01 am e7839263: Merge "Fix stdio read after EOF behavior."
* commit 'e78392637d5086384a5631ddfdfa8d7ec8326ee3':
  Fix stdio read after EOF behavior.
2015-10-12 15:23:48 +00:00
Elliott Hughes e78392637d Merge "Fix stdio read after EOF behavior." 2015-10-12 15:20:29 +00:00
Elliott Hughes 8ab433df13 Fix stdio read after EOF behavior.
Bug: https://code.google.com/p/android/issues/detail?id=184847
Change-Id: Ia20ce94007c2a09649f0763b1dc7ba959f2f618d
2015-10-09 17:57:26 -07:00
Elliott Hughes d8c03b774e am 1ab3f303: Merge "Fix inet_aton on LP32."
* commit '1ab3f303d2e7c8cc498a28fc3c8d9ded1fc46994':
  Fix inet_aton on LP32.
2015-10-10 00:44:51 +00:00
Elliott Hughes 1ab3f303d2 Merge "Fix inet_aton on LP32." 2015-10-10 00:39:11 +00:00
Elliott Hughes 7b77cb35af Fix inet_aton on LP32.
I wasn't checking for overflow. Luckily, I had a test that overflows on LP32.

Change-Id: If2cf33d88f459eb26d0ce75f3c5ed192f516ab7a
2015-10-09 17:36:05 -07:00
Mike Frysinger 132b9c90fc am c6f704bf: Merge "utmp.h: add more ut_type defines"
* commit 'c6f704bf77576b2cf27decd8ee50c99aeeb9e209':
  utmp.h: add more ut_type defines
2015-10-09 23:37:18 +00:00
Mike Frysinger c6f704bf77 Merge "utmp.h: add more ut_type defines" 2015-10-09 23:33:37 +00:00
Josh Gao ac47790ad8 am 902ab885: Merge "Move setjmp cookie to a shared globals struct."
* commit '902ab8859f360d81d6bd03a76a77900743018a15':
  Move setjmp cookie to a shared globals struct.
2015-10-09 23:33:32 +00:00
Josh Gao dc9ff1b80b am 73a91218: Merge "Move VDSO pointers to a shared globals struct."
* commit '73a91218d1f0b334b97648461b19eed96e6c4336':
  Move VDSO pointers to a shared globals struct.
2015-10-09 23:33:30 +00:00
Josh Gao 902ab8859f Merge "Move setjmp cookie to a shared globals struct." 2015-10-09 23:27:07 +00:00
Josh Gao 73a91218d1 Merge "Move VDSO pointers to a shared globals struct." 2015-10-09 23:26:53 +00:00
Josh Gao fe9d0ed6cb Move setjmp cookie to a shared globals struct.
Change-Id: I59a4c187d61524c4e48655c4c6376dba0d41eee2
2015-10-09 15:59:04 -07:00
Josh Gao 93c0f5ee00 Move VDSO pointers to a shared globals struct.
Change-Id: I01cbc9cf0917dc1fac52d9205bda2c68529d12ef
2015-10-09 15:59:04 -07:00
Elliott Hughes 8733118fa5 am 487a1823: Merge "Fix inet_addr/inet_aton/inet_network."
* commit '487a1823e8617011009eded8eae9a75c1f871887':
  Fix inet_addr/inet_aton/inet_network.
2015-10-09 22:53:45 +00:00
Mike Frysinger 68af0adeb9 utmp.h: add more ut_type defines
This fills out the defines that utmp.h normally offers on other systems
such as glibc.

BUG=24810744

Change-Id: If57f9ced22e8673f072245fce3f5c0f8e1f591e5
2015-10-09 18:52:49 -04:00
Elliott Hughes 487a1823e8 Merge "Fix inet_addr/inet_aton/inet_network." 2015-10-09 22:48:13 +00:00
Elliott Hughes 047866672c Fix inet_addr/inet_aton/inet_network.
Rewrite inet_addr and inet_network in terms of inet_aton, and reimplement
that to include all the missing error checks.

Bug: http://b/24754503
Change-Id: I5dfa971c87201968985a0894df419f0fbf54768a
2015-10-09 15:44:24 -07:00
Elliott Hughes c1d7d92201 am f41fe717: Merge "Sync with upstream tzcode (2015g)."
* commit 'f41fe717655f01affc1d8244ff9efccc04d86620':
  Sync with upstream tzcode (2015g).
2015-10-09 22:42:25 +00:00
Elliott Hughes f41fe71765 Merge "Sync with upstream tzcode (2015g)." 2015-10-09 22:35:24 +00:00
Elliott Hughes 9fb22a3ec4 Sync with upstream tzcode (2015g).
This is quite a large patch because we haven't updated for some time,
but the good news is that upstream is now thread-safe so a lot of our
changes go away in this update and the remaining diff is a lot smaller.

(Note that our whitespace still doesn't match upstream. I use diff -wub
to compare. Upstream doesn't even really have a consistent style. New
code seems to be two spaces, old code tabs.)

From the intervening changelogs (eliding the changes that only affected
the tools, which we don't use):

2014a:
     An uninitialized-storage bug in 'localtime' has been fixed.
     (Thanks to Logan Chien.)

2014b:
     'zic' and 'localtime' no longer reject locations needing four
     transitions per year for the forseeable future.  (Thanks to Andrew
     Main (Zefram).)

2014c:
     <None>

2014d:
     <None>

2014e:
     <None>

2014f:
     'localtime', 'mktime', etc. now use much less stack space if
     ALL_STATE is defined.  (Thanks to Elliott Hughes for reporting the
     problem.)

     Some lint has been removed when using GCC_DEBUG_FLAGS with GCC
     4.9.0.

2014g:
     Unless NETBSD_INSPIRED is defined to 0, the tz library now
     supplies functions for creating and using objects that represent
     time zones. The new functions are tzalloc, tzfree, localtime_rz,
     mktime_z, and (if STD_INSPIRED is also defined) posix2time_z and
     time2posix_z.  They are intended for performance: for example,
     localtime_rz (unlike localtime_r) is trivially thread-safe without
     locking.  (Thanks to Christos Zoulas for proposing NetBSD-inspired
     functions, and to Alan Barrett and Jonathan Lennox for helping to
     debug the change.)

     If THREAD_SAFE is defined to 1, the tz library is now thread-safe.
     Although not needed for tz's own applications, which are single-threaded,
     this supports POSIX better if the tz library is used in multithreaded apps.

     Some crashes have been fixed when zdump or the tz library is given
     invalid or outlandish input.

     The tz library no longer mishandles leap seconds on platforms with
     unsigned time_t in time zones that lack ordinary transitions after 1970.

     The tz code now attempts to infer TM_GMTOFF and TM_ZONE if not
     already defined, to make it easier to configure on common platforms.
     Define NO_TM_GMTOFF and NO_TM_ZONE to suppress this.

     Unless the new macro UNINIT_TRAP is defined to 1, the tz code now
     assumes that reading uninitialized memory yields garbage values
     but does not cause other problems such as traps.

     If TM_GMTOFF is defined and UNINIT_TRAP is 0, mktime is now
     more likely to guess right for ambiguous time stamps near
     transitions where tm_isdst does not change.

     If HAVE_STRFTIME_L is defined to 1, the tz library now defines
     strftime_l for compatibility with recent versions of POSIX.
     Only the C locale is supported, though.  HAVE_STRFTIME_L defaults
     to 1 on recent POSIX versions, and to 0 otherwise.

     tzselect -c now uses a hybrid distance measure that works better
     in Africa.  (Thanks to Alan Barrett for noting the problem.)

     The C source code now ports to NetBSD when GCC_DEBUG_FLAGS is used,
     or when time_tz is defined.

     When HAVE_UTMPX_H is set the 'date' command now builds on systems
     whose <utmpx.h> file does not define WTMPX_FILE, and when setting
     the date it updates the wtmpx file if _PATH_WTMPX is defined.
     This affects GNU/Linux and similar systems.

     For easier maintenance later, some C code has been simplified,
     some lint has been removed, and the code has been tweaked so that
     plain 'make' is more likely to work.

     The C type 'bool' is now used for boolean values, instead of 'int'.

     The long-obsolete LOCALE_HOME code has been removed.

     The long-obsolete 'gtime' function has been removed.

2014h:
     The tz library's localtime and mktime functions now set tzname to a value
     appropriate for the requested time stamp, and zdump now uses this
     on platforms not defining TM_ZONE, fixing a 2014g regression.
     (Thanks to Tim Parenti for reporting the problem.)

     The tz library no longer sets tzname if localtime or mktime fails.

     An access to uninitalized data has been fixed.
     (Thanks to Jörg Richter for reporting the problem.)

     When THREAD_SAFE is defined, the code ports to the C11 memory model.
     A memory leak has been fixed if ALL_STATE and THREAD_SAFE are defined
     and two threads race to initialize data used by gmtime-like functions.
     (Thanks to Andy Heninger for reporting the problems.)

2014i:
     The time-related library functions now set errno on failure,
     and some crashes in the new tzalloc-related library functions
     have been fixed.  (Thanks to Christos Zoulas for reporting
     most of these problems and for suggesting fixes.)

     If USG_COMPAT is defined and the requested time stamp is
     standard time, the tz library's localtime and mktime functions
     now set the extern variable timezone to a value appropriate
     for that time stamp; and similarly for ALTZONE, daylight
     saving time, and the altzone variable.  This change is a
     companion to the tzname change in 2014h, and is designed to
     make timezone and altzone more compatible with tzname.

     The tz library's functions now set errno to EOVERFLOW if they
     fail because the result cannot be represented.  ctime and
     ctime_r now return NULL and set errno when a time stamp is out
     of range, rather than having undefined behavior.

     Some bugs associated with the new 2014g functions have been
     fixed.  This includes a bug that largely incapacitated the new
     functions time2posix_z and posix2time_z.  (Thanks to Christos
     Zoulas.)  It also includes some uses of uninitialized
     variables after tzalloc.  The new code uses the standard type
     'ssize_t', which the Makefile now gives porting advice about.

2014j:
     <None>

2015a:
     tzalloc now scrubs time zone abbreviations compatibly with the way
     that tzset always has, by replacing invalid bytes with '_' and by
     shortening too-long abbreviations.

2015b:
     Fix integer overflow bug in reference 'mktime' implementation.
     (Problem reported by Jörg Richter.)

     Allow -Dtime_tz=time_t compilations, and allow -Dtime_tz=... libraries
     to be used in the same executable as standard-library time_t functions.
     (Problems reported by Bradley White.)

2015c:
     <None>

2015d:
     <None>

2015e:
     <None>

2015f:
     <None>

2015g:
    localtime no longer mishandles America/Anchorage after 2037.
    (Thanks to Bradley White for reporting the bug.)

    On hosts with signed 32-bit time_t, localtime no longer mishandles
    Pacific/Fiji after 2038-01-16 14:00 UTC.

    The localtime module allows the variables 'timezone', 'daylight',
    and 'altzone' to be in common storage shared with other modules,
    and declares them in case the system <time.h> does not.
    (Problems reported by Kees Dekker.)

    On platforms with tm_zone, strftime.c now assumes it is not NULL.
    This simplifies the code and is consistent with zdump.c.
    (Problem reported by Christos Zoulas.)

Change-Id: I9eb0a8323cb8bd9968fcfe612dc14f45aa3b59d2
2015-10-09 15:15:39 -07:00
Dimitry Ivanov 533d7e403d am 6a59289b: Merge "Remove textrels support for platform libs"
* commit '6a59289b06deafe5eed49d86753297c604eadc86':
  Remove textrels support for platform libs
2015-10-09 21:14:26 +00:00
Dimitry Ivanov 6a59289b06 Merge "Remove textrels support for platform libs" 2015-10-09 21:09:46 +00:00
Dmitriy Ivanov 8068786ae6 Remove textrels support for platform libs
Bug: http://b/20013628
Change-Id: Ia9382c7113e09bb6aed65072543e4ebe33026cf8
2015-10-09 13:59:42 -07:00
Josh Gao 786807b26c am d8df28ff: Merge "Implement setjmp cookies on MIPS and MIPS64"
* commit 'd8df28ff3833e620db1b61dd4038028dd160c870':
  Implement setjmp cookies on MIPS and MIPS64
2015-10-09 18:39:57 +00:00
Josh Gao d8df28ff38 Merge "Implement setjmp cookies on MIPS and MIPS64" 2015-10-09 18:32:20 +00:00
Neil Fuller 31740bfdb9 Update timezone data to 2015g
Changes affecting future time stamps

    Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.
    (Thanks to Fatih.)

    Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.
    (Thanks to Alexander Krivenyshev.)

    Fiji's 2016 fall-back transition is scheduled for January 17, not 24.
    (Thanks to Ken Rylander.)

    Fort Nelson, British Columbia will not fall back on 2015-11-01. It has
    effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
    New zone America/Fort_Nelson.  (Thanks to Matt Johnson.)

  Changes affecting past time stamps

    Norfolk observed DST from 1974-10-27 02:00 to 1975-03-02 02:00.

Bug: 24595281
Change-Id: I7e4e4c53b4843110540f573ba82d3761c871c096
2015-10-09 17:58:58 +01:00
Nikola Veljkovic 1b519c0ae4 Implement setjmp cookies on MIPS and MIPS64
Bug: http://b/23942752
Change-Id: Ie58892a97b5075d30d7607667251007cda99d38c
2015-10-09 13:42:58 +02:00
Dan Albert 17e3aec523 am 599af934: Merge "Fix bionic_coverage for kati."
* commit '599af9346e3ea697dda1b0c38a99cce842154307':
  Fix bionic_coverage for kati.
2015-10-08 22:08:28 +00:00
Dimitry Ivanov ec48a72a00 am 268f7391: Merge "Make dt_runpath work for libraries opened from apk"
* commit '268f73917831e709bc6a201658c19ffb5c8cbfd1':
  Make dt_runpath work for libraries opened from apk
2015-10-08 22:08:17 +00:00