Commit graph

10212 commits

Author SHA1 Message Date
Christopher Ferris
3da136aa47 Modify test to avoid race condition.
There is a possible race if a timer is set to trigger at nearly the same
time as it is set. Since nobody uses the timers like this, modify the test
so this doesn't happen. The race that this can provoke has been fixed in
aosp.

Bug: 19423618
Change-Id: I21084c99da5ae46f404936d673dae6bad7c82caa
2015-02-18 17:45:50 -08:00
Neil Fuller
4177bd8d16 Fixes to the update-tzdata.py tool
We build one too many times. Creating a missing directory
is sufficient.

The tz2icu needs some files in the CWD. Added symlinks.

Bug: 19230091
(cherry-pick of commit 0662c3e5b3)
Change-Id: Ie21d848f1b776ec745473b9122e003fdf0acf105
2015-02-02 17:53:19 +00:00
Neil Fuller
700eb048fb Update tzdata to tzdata2015a
Time Zone Data v. 2015a (Released 2015-01-29)
http://www.iana.org/time-zones/repository/releases/tzdata2015a.tar.gz

Information from NEWS:

Release 2015a - 2015-01-29 22:35:20 -0800

  Changes affecting future time stamps

    The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.  (Thanks to Steffen Thorsen and Gwillim Law.)

    Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)

    New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
    (Thanks to Tim Parenti.)

  Changes affecting past time stamps

    Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct. 29, not Nov. 29.  Remove incorrect data from
    Shanks about time in Iceland between 1837 and 1908.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
    and Asia/Muscat.

  Changes affecting code

    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.

    tzselect ports to POSIX awk implementations, no longer mishandles
    POSIX TZ settings when GNU awk is used, and reports POSIX TZ
    settings to the user.  (Thanks to Stefan Kuhn.)

  Changes affecting build procedure

    'make check' now checks for links to links in the data.
    One such link (for Africa/Asmera) has been fixed.
    (Thanks to Stephen Colebourne for pointing out the problem.)

  Changes affecting commentary

    The leapseconds file commentary now mentions the expiration date.
    (Problem reported by Martin Burnicki.)

    Update Mexican Library of Congress URL.

Bug: 19212588
Change-Id: Idc07ac862901500d4a1dbd0f4aadcfd0aa9d10b8
2015-02-02 11:32:10 +00:00
Dmitriy Ivanov
d9e211ca1f Print error when prelink fails for main executable
Bug: 18931021
Change-Id: Ieefdcf60f1506af522714300030754a4ed61c08e
2015-01-07 11:23:34 -08:00
Elliott Hughes
c7450f7738 Restore symbols from <arpa/nameser.h>.
Bug: 18627252
Bug: https://code.google.com/p/android/issues/detail?id=81690

(cherry picked from commit 42804c4b30)

Change-Id: Idd33578b31bba9a4afdfd15c7b193d10974aea90
2014-12-04 13:45:22 -08:00
Elliott Hughes
27d276f3a6 Avoid pathological behavior in OpenBSD's fread.
(cherry picked from commit 20841a137b)

Bug: https://code.google.com/p/android/issues/detail?id=81155
Bug: 18556607
Change-Id: Ibdfebc20dce4c34ad565014523c9b074e90ea665
2014-12-02 14:54:52 -08:00
Elliott Hughes
152e978f73 Merge "Put stdin/stdout/stderr symbols in place." into lmp-mr1-dev 2014-12-02 18:56:50 +00:00
Elliott Hughes
111461aaae Put stdin/stdout/stderr symbols in place.
To help with future binary compatibility.

Bug: 18553223
Change-Id: Ia8103b4f189c18528b11948ac9e520f61b9ccc0e
2014-12-01 21:27:59 -08:00
Lorenzo Colitti
e5477f83b0 Fail queries fast if no DNS servers are configured.
When no DNS servers are configured (and thus there is no chance
that the DNS query will suceed), res_nsend returns early, but
it does not tell the cache that the query has failed.
Therefore, if the caller retries the query, it will block for
PENDING_REQUEST_TIMEOUT (= 20 seconds) waiting for the "existing
query" (which isn't actually doing anything) to complete.

Bug: 18240188
Bug: 18327075
Change-Id: I0df13ff4a17ee65e640be96695a3af31b020963a
2014-12-01 20:03:25 +00:00
Elliott Hughes
432f645887 Fix flockfile(3) and friends for stdin/stdout/stderr too.
stdin/stdout/stderr are special; their mutexes are initialized by
__sinit. There's no unit test for this, because __sinit has already
been called by the time the first unit test runs, but you could
reproduce this failure with a trivial main() that calls flockfile
or ftrylockfile on one of the standard streams before otherwise
using stdio.

Bug: 18208568

(cherry picked from commit c48c3e4bb3)

Change-Id: Ia0c43ed4ac69daea8152aee9516415a6e3f8a042
2014-11-19 15:49:09 -08:00
Elliott Hughes
047d943ee9 sysconf(3) returns long.
On LP32, this makes no difference. Not an ABI change.

On LP64, results are going to be in %rax or x0 whether they're 32- or 64-bit,
and the only difference is going to be whether the top bits are clobbered.

(cherry picked from commit 60d84af172)

Bug: 18390956
Change-Id: I722461498bc5494e2972fb07d5189dffe76e8993
2014-11-14 15:37:49 -08:00
Daniel Rosenberg
4a50d8ead7 bionic: libc: Added path to vendor build properties file.
Signed-off-by: Daniel Rosenberg <drosen@google.com>

(cherry picked from commit 71d220c1de)

Bug: 18281574
Change-Id: I2843f23ecb4c4ca79b230d8041bbca02dbedeadc
2014-11-13 13:09:59 -08:00
Elliott Hughes
c05314a0b2 Merge "Fix tzdata update tools for 'backzone'." into lmp-mr1-dev 2014-11-12 17:19:57 +00:00
Elliott Hughes
1ca3350f4c Upgrade bionic to tzdata2014j.
From the release notes:

   Changes affecting current and future time stamps

     Turks & Caicos' switch from US eastern time to UTC-4 year-round
     did not occur on 2014-11-02 at 02:00.  It's currently scheduled
     for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)

   Changes affecting past time stamps

     Many pre-1989 time stamps have been corrected for Asia/Seoul and
     Asia/Pyongyang, based on sources for the Korean-language Wikipedia
     entry for time in Korea.  (Thanks to Sanghyuk Jung.)  Also, no
     longer guess that Pyongyang mimicked Seoul time after World War II,
     as this is politically implausible.

     Some more zones have been turned into links, when they differed
     from existing zones only for older time stamps.  As usual,
     these changes affect UTC offsets in pre-1970 time stamps only.
     Their old contents have been moved to the 'backzone' file.
     The affected zones are: Africa/Addis_Ababa, Africa/Asmara,
     Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala,
     Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and
     Indian/Mayotte.

Bug: 18330681

(cherry picked from commit b11d8e057c)

Change-Id: Ifd48e7446e400dccae3afd5cbef96ca843775477
2014-11-11 19:56:09 -08:00
Elliott Hughes
371dcc189f Fix tzdata update tools for 'backzone'.
To maintain the status quo, we need to pull in backzone file. This file
can't be built on its own, so the easiest fix is to give zic(1) all the
files at once.

We also now have a situation where we have links to links, so we need to
dereference them until we find actual data.

Bug: 18330681

(cherry picked from commit 2c2463bd30)

Change-Id: I654b80518a7144038d8b3ea7223f49e2b1d2ad13
2014-11-11 19:55:35 -08:00
Dmitriy Ivanov
9d3382d97a Revert "Fix dlsym() to take into account RTLD_GLOBAL/LOCAL"
This reverts commit c85e82dde5.

Bug: 18222321
Bug: 18211780
Change-Id: I32f4048bd5ea85dc8a3dfccce8cf141b241ab692
2014-11-03 22:15:29 -08:00
Dmitriy Ivanov
69c5d108a5 Revert "Add RTLD_NODELETE flag support"
This reverts commit c87f65d2cd.

Bug: 18222321
Bug: 18211780
Change-Id: I00252e26a28a41ab9f1e2dd3b32f0f80d86297f1
2014-11-03 22:15:26 -08:00
Dmitriy Ivanov
00dce52553 Revert "Fix relocation to look for symbols in local group"
This reverts commit fd2747bb58.

Bug: 18222321
Bug: 18211780
Change-Id: I2d4ebab1e73b7277161af76b99f8249825b22d65
2014-11-03 22:15:20 -08:00
Dmitriy Ivanov
eae0977255 Revert "Remove unnecessary lookups during relocations"
This reverts commit 6442dbd3bc.

Bug: 18222321
Bug: 18211780
Change-Id: I87b18a32238a1f75afe56149221b6691f50d9f56
2014-11-03 22:15:17 -08:00
Dmitriy Ivanov
4402804c35 Revert "Fix mips build"
This reverts commit bf3d5ef5fd.

Bug: 18222321
Bug: 18211780
Change-Id: I902ed888197b358c77303f1acb6d5ffd7ae6dcd3
2014-11-03 22:15:13 -08:00
Dmitriy Ivanov
f947be2889 Revert "Fix symbol lookup order during relocation"
This reverts commit 976402cca1.

Bug: 18222321
Bug: 18211780
Change-Id: Iafdd3d843db7b1cf288be9a0232022816622c944
2014-11-03 22:15:08 -08:00
Dmitriy Ivanov
494bee796a Revert "Fix arm64 and arm builds."
This reverts commit 445111a1c9.

Bug: 18222321
Bug: 18211780
Change-Id: I4fa9e1b63ec9b528f8bfed73c2ec15046c43a2fe
2014-11-03 22:14:19 -08:00
Elliott Hughes
d18f4b2578 Ensure we initialize stdin/stdout/stderr's recursive mutexes.
(cherry-pick of 6a03abcfd23f31d1df06eb0059830e22621282bb.)

Bug: 18208568
Change-Id: I9da16ce0f9375bc363d1d02be706d73fd3b1e150
2014-11-03 13:46:41 -08:00
Dmitriy Ivanov
445111a1c9 Fix arm64 and arm builds.
Bug: 18186310

(cherry picked from commit 4e446b19d8)

Change-Id: Ibc77a9ade36dc6b9bf5a316b5ab9ae5f0a70e826
2014-10-31 19:29:04 -07:00
Dmitriy Ivanov
976402cca1 Fix symbol lookup order during relocation
Relocate symbol against DF_1_GLOBAL shared libraries
  loaded before this shared library. This includes
  main executable, ld_preloads and other libraries
  that have DF_1_GLOBAL flag set.

Bug: 2643900
Bug: 15432753
Bug: 18186310

(cherry picked from commit d225a5e652)

Change-Id: I4e889cdf2dfbf8230b0790053d311ee6b0d0ee2d
2014-10-31 17:10:30 -07:00
Dmitriy Ivanov
bf3d5ef5fd Fix mips build
Bug: 18186310

(cherry picked from commit 90b74fb867)

Change-Id: I8d4ed254e5c421b65b62c401abdb1ee07e5dc3b2
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
6442dbd3bc Remove unnecessary lookups during relocations
local_group includes this library and its dependencies.

Bug: 18186310

(cherry picked from commit e47b3f8456)

Change-Id: I93c2d873e924df7319569307444bf603d7d27bf0
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
fd2747bb58 Fix relocation to look for symbols in local group
The local group is a sequence of libraries in default (breadth-first)
  order. It allows RTLD_LOCALLY loaded library to correctly relocate
  symbols within its group (see test-cases).

  Local group lookup is performed after main executable and ld_preloads.

Bug: 2643900
Bug: 15432753
Bug: 18186310

(cherry picked from commit cfa97f172d)

Change-Id: I5fa8c673f929e4652c738912c7ae078d7ec286d2
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
4d0c1f673f Correct way to specify additional dependencies
Previous one was not covering all the targets

Bug: 17548097
Bug: 18186310

(cherry picked from commit 4a9e1937c5)

Change-Id: I2cd9e58893555d16cbfe291b2d1279621489d5ad
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
382e06ce8e Add dlfcn_test to glibc test suite.
Bug: 18186310

(cherry picked from commit eb27bbae8f)

Change-Id: I1d608dfa12dbafbdcdb8bc6d818c5872404c19e0
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
e4bc6f026a Ignore DT_BIND_NOW (0x18)
Bug: 18186310
Bug: 17552334

(cherry picked from commit ea6eae182a)

Change-Id: I07d6f6fbb462fea329581d0da02f6d88be1c262f
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
1d3e81a9e7 Resolve "unused DT entry" warnings for x86_64
Bug: 18186310

(cherry picked from commit 513e29e16f)

Change-Id: I1e4c5af2cdc09dc978c7a78fcdcf8796c919751e
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
c87f65d2cd Add RTLD_NODELETE flag support
Bug: 18186310
Bug: https://code.google.com/p/android/issues/detail?id=64069

(cherry picked from commit 1b20dafdbe)

Change-Id: Ic02eec22a7c322ece65eb40730a3404f611526b1
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
210ff1b27b Fix mips build
Bug: 18186310

(cherry picked from commit ecf532fa1c)

Change-Id: Ia12f2fa28c8cd3204eb7d6b4c7d872f4e81fb8ef
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
0f47d9c1ce Fix unused DT entry warnings.
DT_STRSZ Implement strtab boundary checks
 DT_FLAGS_1 Warn if flags other than DF_1_NOW|DF_1_GLOBAL are set

Bug: 17552334
Bug: 18186310

(cherry picked from commit 6cdeb5234d)

Change-Id: I7ffc7bc600798308a77ad949a644949b64250ae2
2014-10-31 17:03:59 -07:00
Dmitriy Ivanov
f90e21004e Return has_DT_SYMBOLIC flag.
This reverts commit 8f61d99183

 Despite the fact that static linker does all the work while linking
 -Bsymbolic executables, according to the SCO doc following DT_SYMBOLIC
 and DF_SYMBOLIC flags is still a requirement for the dynamic linker
 as well.

 (see http://www.sco.com/developers/gabi/2012-12-31/ch5.dynamic.html)

Bug: 18186310

(cherry picked from commit 96bc37f2e1)

Change-Id: Ie217be4f3305d877066e4cfe91975ae1c7768330
2014-10-31 17:03:59 -07:00
Elliott Hughes
748fbe5c41 Fix a couple more cases of missing CLOEXEC.
The debuggerd case can probably never happen, because you're crashing at this
point anyway. The system property one seems possible though.

Bug: 18186310

(cherry picked from commit 0dc39f9952)

Change-Id: I3e84488fc246f6c28cbd82e96d0cd4343a12c28a
2014-10-31 17:03:21 -07:00
Dmitriy Ivanov
d5eb10875a Temporary disable DL_WARNs for unused DT_*
Bug: 17552334
Bug: 18186310

(cherry picked from commit 1b77423eff)

Change-Id: I8a9d05195a862bc287fff7156913606f0311b8bb
2014-10-31 17:02:14 -07:00
Dmitriy Ivanov
09608848ed Fix 64bit build
Bug: 18186310

(cherry picked from commit f240aa8089)

Change-Id: Id46f1f9be90a17a58fb44d3540095c8c685c9726
2014-10-31 17:02:14 -07:00
Dmitriy Ivanov
634a045c5c Fix some unused DT_ warnings
* DT_PLTGOT - ignored for non-mips
 * DT_RELCOUNT/RELACOUNT - ignored
 * DT_RELENT/RELAENT - sanity checks
 * DT_SYMENT - sanity check
 * DT_SONAME - ignore for now.

Bug: 18186310

(cherry picked from commit 4a6e9a835a)

Change-Id: Ib40095f0770d65628fc7abac5a471378de35ebe7
2014-10-31 17:02:14 -07:00
Dmitriy Ivanov
b364d95380 Remove has_DT_SYMBOLIC flag
From the elf-spec: "Symbolically bound shared objects are
  identified by the .dynamic entry DT_SYMBOLIC. This tag is
  informational only; the runtime linker processes symbol
  lookups from these objects in the same manner as any
  other object."

Bug: 18186310

(cherry picked from commit 8f61d99183)

Change-Id: I37024799ac8d1837993c8ae78780a448bedd6539
2014-10-31 17:02:13 -07:00
Dmitriy Ivanov
c85e82dde5 Fix dlsym() to take into account RTLD_GLOBAL/LOCAL
Symbols from libraries opened with RTLD_LOCAL (default)
  should not be visible via dlsym(RLTD_DEFAULT/RTLD_NEXT, .)

Bug: 17512583
Bug: 18186310

(cherry picked from commit e8ba50fe0d)

Change-Id: Idf6bbe2233fb2bfc0c88677e7d1fc518fb3f7a8b
2014-10-31 17:02:13 -07:00
Dmitriy Ivanov
926797a8a9 Reformatting
No functional changes.

Bug: 18186310

(cherry picked from commit 6abf624d12)]

Change-Id: I0acf52d8ee7fe2d4f44bc832cbe9fabe1782f03f
2014-10-31 17:02:13 -07:00
Dan Albert
653263a964 Only use <atomic> for C++11 and newer.
Any pre-C++11 clients of stdatomic.h that use libc++ are being forced
over to <atomic>, which they don't have the language support to use.

Bug:17736764

Change-Id: I62445c1f2541410a1569498c09433c7196635537
(cherry picked from commit 3ce0769aa5)
2014-10-30 13:22:34 -07:00
Elliott Hughes
b0693ec582 Merge changes I0feda6b2,I22d13fde,I49d7d09d,Ice490bfe into lmp-mr1-dev
* 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.
2014-10-29 23:22:30 +00:00
Elliott Hughes
0c4e98adbe Fix the type of u_ar0 in <sys/user.h>.
(cherry picked from commit e03950fa0c)

Bug: 18172268
Change-Id: I0feda6b253882f68f47bcf30fad998286cc7f620
2014-10-29 11:57:36 -07:00
Elliott Hughes
d0fb6a2940 Add greg_t for arm64.
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 8e4d371091)

Bug: 18172268
Change-Id: I22d13fdeb6431ea122dd028a229782dcaf2286b2
2014-10-29 11:56:59 -07:00
Elliott Hughes
ab4d5cf242 POSIX says <signal.h> gets you ucontext_t.
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 26a8eb50a8)

Bug: 18172268
Change-Id: I49d7d09dabfc6c6926a8e1f4b235d041e2f2fc4d
2014-10-29 11:55:02 -07:00
Elliott Hughes
eedbf70e8e Add in_port_t and move it and in_addr_t to the correct header file.
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 35d226e05d)

Bug: 18172268
Change-Id: Ice490bfe84afb04722d738128053d4c533b8a664
2014-10-29 11:49:45 -07:00
Christopher Ferris
98d57c95bc Add stpcpy assembler version.
For generic, continue to use the C version of the code.

Bug: 13746695

(cherry picked from commit 7d849ac378)

Change-Id: Iae44785f37f9bb59103ab78fb9f74c92f8a95c7f
2014-10-29 11:07:03 -07:00