OSDN Git Service

android-x86/bionic.git
9 years agoFix unload of recursively linked library
Dmitriy Ivanov [Tue, 9 Sep 2014 17:21:42 +0000 (10:21 -0700)]
Fix unload of recursively linked library

  Expanded test for recursive libs. Fixed bug with unnecessary
  soinfo_free of already loaded library.

(cherry picked from commit a6ac54a215d6b64f5cc5a59b66c1dbfbb41ea9f5)

Change-Id: I6907c723d9fbdf6b2777f3f236b1e29b0843edd6

9 years agoAdd IFUNC support for arm64 and IRELATIVE reloc
Dmitriy Ivanov [Thu, 11 Sep 2014 22:16:03 +0000 (15:16 -0700)]
Add IFUNC support for arm64 and IRELATIVE reloc

 There are number of changes in the way IFUNC related relocations are done:
 1. IRELATIVE relocations are now supported for x86/x86_64 and arm64.
 2. IFUNC relocations are now relying on static linker to generate
    them in correct order - this removes necessety of additional
    relocation pass for ifuncs.
 3. Related to 2: rela?.dyn relocations are preformed before .plt ones.
 4. Ifunc are resolved on symbol lookup this approach allowed to avoid
    mprotect(PROT_WRITE) call on r-x program segments.

Bug: 17399706
Bug: 17177284

(cherry picked from commit 9aea164457c269c475592da36b4655d45f55c7bc)

Change-Id: Ie19d900fc203beb93faf8943b0d06d534a6de4ad

9 years agoRefactoring: C++11 style DISABLE_ bionic marcos
Dmitriy Ivanov [Mon, 8 Sep 2014 23:22:22 +0000 (16:22 -0700)]
Refactoring: C++11 style DISABLE_ bionic marcos

  Enable the -std=gnu++11 flag for libstdc++ static and
  dynamic libs.

  ScopeGuard uses DISABLE_ macros instead of '= delete';

(cherry picked from commit d9ff7226613014056c9edd79a68dc5af939107a0)

Change-Id: If2573d080770e18b36b56106f2369f7bb682cd3c

9 years agoReset enviroment for math_tests
Dmitriy Ivanov [Thu, 4 Sep 2014 19:47:07 +0000 (12:47 -0700)]
Reset enviroment for math_tests

Bug: 17390824

(cherry picked from commit 7b956ede3f0f40bd8a085a8ad3729bb3e0e030f2)

Change-Id: I5d804ceb5e69533584161bfed6787529cd8296fb

9 years agoLoad libraries in breadth-first order
Dmitriy Ivanov [Fri, 5 Sep 2014 23:42:53 +0000 (16:42 -0700)]
Load libraries in breadth-first order

  This patch fixes the problem with symbol search order
  for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
  and ld_preloads in correct order.

Bug: https://code.google.com/p/android/issues/detail?id=74255
Attempt: 2

(cherry picked from commit 14669a939d113214a4a20b9318fca0992d5453f0)

Change-Id: Id87540c96a2242220967b6fa5d84ddcd829e2b97

9 years agoRevert "Load libraries in breadth-first order"
Dmitriy Ivanov [Fri, 5 Sep 2014 21:57:59 +0000 (14:57 -0700)]
Revert "Load libraries in breadth-first order"

This reverts commit a3ad450a2e3fb6b3fe359683b247eba20896f646.

(cherry picked from commit 498eb18b82a425f9f30132e4832f327b2ee0e545)

Change-Id: Iec7eab83d0c0ed1604e1e8ea3f9e9d0ce1d29680

9 years agoFix order of soinfo links (repairs libcxx tests).
Dmitriy Ivanov [Fri, 5 Sep 2014 01:23:00 +0000 (18:23 -0700)]
Fix order of soinfo links (repairs libcxx tests).

(cherry picked from commit b2a30ee8d209154efc367db11b4167a5d6db605f)

Change-Id: I59c5333bc050cbbea14051cea9220be2f64ee383

9 years agoLoad libraries in breadth-first order
Dmitriy Ivanov [Tue, 29 Jul 2014 21:21:45 +0000 (14:21 -0700)]
Load libraries in breadth-first order

  This patch fixes the problem with symbol search order
  for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
  and ld_preloads in correct order.

Bug: https://code.google.com/p/android/issues/detail?id=74255

(cherry picked from commit a3ad450a2e3fb6b3fe359683b247eba20896f646)

Change-Id: I1125de10272c84e4f075cbc72859c1f6b3e89943

9 years agoEnable clang compilation with libc but not linker.
Chih-Hung Hsieh [Thu, 4 Sep 2014 22:19:52 +0000 (15:19 -0700)]
Enable clang compilation with libc but not linker.

Clang is still disabled for x86 and x86_64 long double code,
for x86_64 special assembly instruction, and the linker module.

BUG: 17163651
BUG: 17302991
BUG: 17403674

(cherry picked from commit b58db8b083ce41798a5310616e4f20885cec611f)

Change-Id: I916c05056d37a9c287b0a5ae3b1a209d98c8f70e

9 years agoEncapsulate soinfo_link_image and soinfo_relocate
Dmitriy Ivanov [Tue, 2 Sep 2014 18:47:23 +0000 (11:47 -0700)]
Encapsulate soinfo_link_image and soinfo_relocate

 Also get rid of needed[] array for these functions

(cherry picked from commit 29bbc9dd4c606de9187e46d8899a2a744715c967)

Change-Id: Id208621f66afa2e02a6b3facacee7d874466d81b

9 years agoImplement LinkedList::visit()
Dmitriy Ivanov [Tue, 2 Sep 2014 16:45:40 +0000 (09:45 -0700)]
Implement LinkedList::visit()

(cherry picked from commit a4926058496c1c24c00ac07e42d45048dac7c487)

Change-Id: I59554be45c910bfe33494016595a5ade9daad230

9 years agoIntroduce size-based r/w allocators
Dmitriy Ivanov [Mon, 1 Sep 2014 23:15:52 +0000 (16:15 -0700)]
Introduce size-based r/w allocators

(cherry picked from commit 0cd83ebb0e9784827d9ec0a8028a710e73a28b2b)

Change-Id: Ib037bd5313c9a78b6051482f14e789aa820b4dd1

9 years agoErase elements in LinkedList::remove_if
Dmitriy Ivanov [Fri, 29 Aug 2014 21:01:48 +0000 (14:01 -0700)]
Erase elements in LinkedList::remove_if

(cherry picked from commit 4bea498544bb1377f610520d7f58856382a6e5fc)

Change-Id: I1ffe248bc2b7572f38fbd987e9c6db5ecbd4559d

9 years agoReplace NULL with nullptr
Dmitriy Ivanov [Fri, 29 Aug 2014 19:02:36 +0000 (12:02 -0700)]
Replace NULL with nullptr

(cherry picked from commit 851135bf9941b3813adb9b4f43d76e040c4ba157)

Change-Id: Ic4997907680db7472ef38ffb0f0ca66fff37b797

9 years agoRemove unnecessary calls to LinkedList::clear()
Dmitriy Ivanov [Tue, 26 Aug 2014 22:56:31 +0000 (15:56 -0700)]
Remove unnecessary calls to LinkedList::clear()

(cherry picked from commit 608217e1674d8fd8b334fe18c753b6c4638ed783)

Change-Id: I031359d79b2e77977ace197ef410e41539dc0ce6

9 years agoEnable __cxa_atexit && __cxa_finalize for linker
Dmitriy Ivanov [Tue, 26 Aug 2014 21:16:52 +0000 (14:16 -0700)]
Enable __cxa_atexit && __cxa_finalize for linker

 This allows adding destructors to classes used
 for global variables.

(cherry picked from commit 14241402de0faa4b244b1bd6b1f0799ce169b880)

Change-Id: I1d8776130d1e01a8c53d23a2949f5010f4c96b16

9 years agoBump soinfo version
Dmitriy Ivanov [Fri, 22 Aug 2014 19:25:04 +0000 (12:25 -0700)]
Bump soinfo version

 This includes:
 1. Placing has_ifunc after fields with version = 0
 2. Switch to has_min_version(v) function.
 3. Minor soinfo initialization refactoring (placement new + ctor)

(cherry picked from commit 0d15094287fe0f288d9c258953143fc1998b6b5a)

Change-Id: Idf135fdd3d4826b5653f32add2adc6db5d4a4f95

9 years agoRun constructors before resolving ifunc functions
Dmitriy Ivanov [Thu, 21 Aug 2014 20:54:03 +0000 (13:54 -0700)]
Run constructors before resolving ifunc functions

Bug: 17177284

(cherry picked from commit 9598b8c415e2fa9f240508185fe8c964b83f538d)

Change-Id: I2c9631ee1cd77f8cf95ec0216a35b605c8786454

9 years agoAdded test for ifunc support in dynamic linker.
Brigid Smith [Wed, 23 Jul 2014 18:22:25 +0000 (11:22 -0700)]
Added test for ifunc support in dynamic linker.

ifuncs now work in i386 and x86_64 when called in the same library as
well as in a different library.

Bug:6657325
(cherry picked from commit c5a13efa9bc4264be0a9a9e37c00633af01584ed)

Change-Id: I321d780bc2f9bd1baa749e1acacd2683aefe827b

9 years agoMerge "Update bionic to tzdata 2014h." into lmp-mr1-dev
Elliott Hughes [Wed, 1 Oct 2014 18:02:51 +0000 (18:02 +0000)]
Merge "Update bionic to tzdata 2014h." into lmp-mr1-dev

9 years agoUpdate bionic to tzdata 2014h.
Elliott Hughes [Wed, 1 Oct 2014 00:35:38 +0000 (17:35 -0700)]
Update bionic to tzdata 2014h.

From the release notes:

  Changes affecting past time stamps

    America/Jamaica's 1974 spring-forward transition was Jan. 6, not Apr. 28.

    Shanks says Asia/Novokuznetsk switched from LMT (not "NMT") on 1924-05-01,
    not 1920-01-06.  The old entry was based on a misinterpretation of Shanks.

    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/Blantyre, Africa/Bujumbura,
    Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi,
    Africa/Lusaka, Africa/Maseru, and Africa/Mbabane.

Bug: 17731498

(cherry picked from commit 0c8fb51e6b8cfcd00d453cb5ebfa516f02009854)

Change-Id: Icf8a9cbd309951b4ffc20c74eb1e78c1e39c222f

9 years agoFix update-tzdata.py to rebuild icu4c .dat file.
Elliott Hughes [Wed, 1 Oct 2014 00:30:01 +0000 (17:30 -0700)]
Fix update-tzdata.py to rebuild icu4c .dat file.

Bug: 17731498

(cherry picked from commit f8896c6c93fd698b129742780878123a3a19ae07)

Change-Id: If97e1ccf593a2ed6c2356077e660d6fd88a05875

9 years agoMerge "Re-expose more stdio implementation details for LP32." into lmp-dev
Elliott Hughes [Thu, 25 Sep 2014 03:06:29 +0000 (03:06 +0000)]
Merge "Re-expose more stdio implementation details for LP32." into lmp-dev

9 years agoRe-expose more stdio implementation details for LP32.
Elliott Hughes [Thu, 25 Sep 2014 00:20:53 +0000 (17:20 -0700)]
Re-expose more stdio implementation details for LP32.

Keeps a variety of apps running.

Bug: 17047819
Change-Id: I55882ec95f2b59a5df76e5a89c23aa315609e01d

9 years agoFix sys_stat.mkfifo when not run as root.
Christopher Ferris [Wed, 24 Sep 2014 23:01:18 +0000 (16:01 -0700)]
Fix sys_stat.mkfifo when not run as root.

It's not allowed for a shell user to create a fifo in /data/local/tmp.
Make the test do nothing if not run as root.

Bug: 17646702
Change-Id: I932262fa233eae8b5dd607a2398a47c50a208701

9 years agoFix incorrect parameter types for locale funcs.
Dan Albert [Tue, 23 Sep 2014 22:32:24 +0000 (15:32 -0700)]
Fix incorrect parameter types for locale funcs.

strtoll(3), strtoull(3), wcstoll(3), and wcstoull(3) all take an _int_
as a base, not a size_t. This is an ABI compatibility issue.

Bug: 17628622
Change-Id: I17f8eead34ce2112005899fc30162067573023ec
(cherry picked from commit 3c5037f1b3b747e79d17a5f717d9f9c365132d33)

9 years agoPull input.h from v3.16.1 kernel headers.
Christopher Ferris [Sun, 14 Sep 2014 19:08:37 +0000 (12:08 -0700)]
Pull input.h from v3.16.1 kernel headers.

Bug: 17407564
Change-Id: Idcfc40a7254605280e3d5474c61ae1ab7b2b7b51

9 years agoExpose __swsetup for LP32 binary compatibility.
Elliott Hughes [Thu, 11 Sep 2014 23:41:11 +0000 (16:41 -0700)]
Expose __swsetup for LP32 binary compatibility.

Bug: 17476127
Change-Id: I0ef1355ac913d782c268a638f88642d6cfc236c2

9 years agoAdd pthread_gettid_np and re-expose __get_thread for LP32.
Elliott Hughes [Thu, 11 Sep 2014 23:11:43 +0000 (16:11 -0700)]
Add pthread_gettid_np and re-expose __get_thread for LP32.

A lot of third-party code calls the private __get_thread symbol,
often as part of a backport of bionic's pthread_rwlock implementation.
Hopefully this will go away for LP64 (since you're guaranteed the
real implementation there), but there are still APIs that take a tid
and no way to convert between a pthread_t and a tid. pthread_gettid_np
is a public API for that. To aid the transition, make __get_thread
available again for LP32.

Bug: 14079438
Change-Id: I43fabc7f1918250d31d4665ffa4ca352d0dbeac1

9 years agoFix mips __fadvise64.S build failure.
Elliott Hughes [Thu, 11 Sep 2014 17:10:08 +0000 (10:10 -0700)]
Fix mips __fadvise64.S build failure.

Bug: 12449798

(cherry picked from commit 9990b3973bdfcda5419c06886215147a878222f1)

Change-Id: Iba92e2aa262666a59fc38b870dfd9f4082eeb628

9 years agoMerge "Add posix_fadvise(3)." into lmp-dev
Elliott Hughes [Thu, 11 Sep 2014 15:43:05 +0000 (15:43 +0000)]
Merge "Add posix_fadvise(3)." into lmp-dev

9 years agoAdd posix_fadvise(3).
Elliott Hughes [Thu, 11 Sep 2014 00:39:00 +0000 (17:39 -0700)]
Add posix_fadvise(3).

Bug: 12449798
Change-Id: I07cbf3f670a0d1304b68148325a774f266b5c433

9 years agoWhen comparing DNS server configs, also compare number of servers
Lorenzo Colitti [Mon, 8 Sep 2014 09:09:43 +0000 (18:09 +0900)]
When comparing DNS server configs, also compare number of servers

Bug: 16070602
Change-Id: I605f1cca50b08479ebcad290b3bd179f59be8a96

9 years agoEnsure __set_errno is still visible on LP32.
Elliott Hughes [Mon, 8 Sep 2014 22:25:01 +0000 (15:25 -0700)]
Ensure __set_errno is still visible on LP32.

The use of the .hidden directive to avoid going via the PLT for
__set_errno had the side-effect of actually making __set_errno
hidden (which is odd because assembler directives don't usually
affect symbols defined in a different file --- you can't even
create a weak reference to a symbol that's defined in a different
file).

This change switches the system call stubs over to a new always-hidden
__set_errno_internal and has a visible __set_errno on LP32 just for
binary compatibility with old NDK apps.

Bug: 17423135
Change-Id: I6b6d7a05dda85f923d22e5ffd169a91e23499b7b

9 years agoMerge "Don't expose non-standard basename_r and dirname_r in LP64." into lmp-dev
Elliott Hughes [Mon, 8 Sep 2014 18:07:07 +0000 (18:07 +0000)]
Merge "Don't expose non-standard basename_r and dirname_r in LP64." into lmp-dev

9 years agoAdd arc4random_addrandom binary compatibility.
Elliott Hughes [Mon, 8 Sep 2014 17:25:33 +0000 (10:25 -0700)]
Add arc4random_addrandom binary compatibility.

This was in <stdlib.h> in older releases. It's no longer used, but we can
preserve backwards compatibility by making it a no-op.

Bug: 16205834
Change-Id: Idde7b46df4f253e39675600bcf82352879a716e7

9 years agoMerge "Add dlmalloc_usable_size for 32 bit arches." into lmp-dev
Christopher Ferris [Sat, 6 Sep 2014 19:58:39 +0000 (19:58 +0000)]
Merge "Add dlmalloc_usable_size for 32 bit arches." into lmp-dev

9 years agoAdd dlmalloc_usable_size for 32 bit arches.
Christopher Ferris [Fri, 5 Sep 2014 23:39:22 +0000 (16:39 -0700)]
Add dlmalloc_usable_size for 32 bit arches.

Bug: 17337831
Change-Id: I50c50559a5dfa083c85f064042bc0726718c988b

9 years agoDon't expose non-standard basename_r and dirname_r in LP64.
Elliott Hughes [Fri, 5 Sep 2014 23:12:42 +0000 (16:12 -0700)]
Don't expose non-standard basename_r and dirname_r in LP64.

Bug: 17407423
Change-Id: I47fe499a4c396bf09d7b78fd828728d04777398b

9 years agoFix pthread_attr_getstack__main_thread.
Elliott Hughes [Thu, 4 Sep 2014 23:09:25 +0000 (16:09 -0700)]
Fix pthread_attr_getstack__main_thread.

There were two problems here:

* This would fail when run with unlimited stack, because it didn't know
  that bionic reports unlimited stacks as 8MiB.

* This would leave RLIMIT_STACK small, causing failures to exec (so the
  popen and system tests would fail).

(cherry-pick of 27a9aed81978af792cb06035a1619c8141a5fb5b plus the
new ScopeGuard.h from a3ad450a2e3fb6b3fe359683b247eba20896f646.)

Bug: 17394276
Change-Id: I5b92dc64ca089400223b2d9a3743e9b9d57c1bc2

9 years agoAdd back a dummy arc4random_stir for compatibility.
Elliott Hughes [Wed, 3 Sep 2014 22:53:11 +0000 (15:53 -0700)]
Add back a dummy arc4random_stir for compatibility.

The current arc4random implementation stirs itself as needed, but we
need to keep an arc4random_stir symbol around for binary compatibility.

Bug: 17291075
Change-Id: Iaf6171c3ec65c39c1868364d5b35ea280e29a363

9 years agoMerge "Upgrade bionic to tzdata2014g." into lmp-dev
Elliott Hughes [Tue, 2 Sep 2014 21:39:02 +0000 (21:39 +0000)]
Merge "Upgrade bionic to tzdata2014g." into lmp-dev

9 years agoMake stdatomic.h work with gcc4.6 host compiler
Hans Boehm [Thu, 28 Aug 2014 22:21:32 +0000 (15:21 -0700)]
Make stdatomic.h work with gcc4.6 host compiler

This is needed to make L work correctly, and bionic tests pass
again, after applying the equivalent of
commit 00aaea364501b3b0abe58dae461136159df1e356 there.

It makes the preexisting code that uses __sync implementations
much more useful, although we should no longer be exercising that
code in AOSP.

Specifically fixes:

We were invoking __has_extension and __has_builtin for GCC compilations.
They're clang specific. Restructured the tests.

The __sync implementation was not defining the LOCK_FREE macros.

ATOMIC_VAR_INIT was using named field initializations.  These are a
C, not C++, feature, that is not supported by g++ 4.6.

The stdatomic bionic test still failed with 4.6 and glibc with our
questionable LOCK_FREE macro implementation.  Don't run that piece
with 4.6.

In L, this is a prerequisite for fixing:

    Bug:16880454
    Bug:16513433

Change-Id: I9b61e42307f96a114dce7552b6ead4ad1c544eab
(cherry picked from commit 32429606bf696d3b2ca555f132a0d60c566d0bd0)

9 years agoUpgrade bionic to tzdata2014g.
Elliott Hughes [Tue, 2 Sep 2014 16:44:33 +0000 (09:44 -0700)]
Upgrade bionic to tzdata2014g.

From the release notes:

  Changes affecting future time stamps

    Turks & Caicos is switching from US eastern time to UTC-4 year-round,
    modeled as a switch from EST/EDT to AST on 2014-11-02 at 02:00.

  Changes affecting past time stamps

    Time in Russia or the USSR before 1926 or so has been corrected by
    a few seconds in the following zones: Asia/Irkutsk,
    Asia/Krasnoyarsk, Asia/Omsk, Asia/Samarkand, Asia/Tbilisi,
    Asia/Vladivostok, Asia/Yakutsk, Europe/Riga, Europe/Samara.  For
    Asia/Yekaterinburg the correction is a few minutes.  (Thanks to
    Vladimir Karpinsky.)

    The Portuguese decree of 1911-05-26 took effect on 1912-01-01.
    This affects 1911 time stamps in Africa/Bissau, Africa/Luanda,
    Atlantic/Azores, and Atlantic/Madeira.  Also, Lisbon's pre-1912
    GMT offset was -0:36:45 (rounded from -0:36:44.68), not -0:36:32.
    (Thanks to Stephen Colebourne for pointing to the decree.)

    Asia/Dhaka ended DST on 2009-12-31 at 24:00, not 23:59.

    A new file 'backzone' contains data which may appeal to
    connoisseurs of old time stamps, although it is out of scope for
    the tz database, is often poorly sourced, and contains some data
    that is known to be incorrect.  The new file is not recommended
    for ordinary use and its entries are not installed by default.
    (Thanks to Lester Caine for the high-quality Jersey, Guernsey, and
    Isle of Man entries.)

    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/Bangui, Africa/Brazzaville,
    Africa/Douala, Africa/Kinshasa, Africa/Libreville, Africa/Luanda,
    Africa/Malabo, Africa/Niamey, and Africa/Porto-Novo.

Bug: 17277574

(cherry picked from commit 9685c30a2375635f7410e60eff2f0559f7e84df6)

Change-Id: I6120be3a0ec76af2d07ca6f9ea6f83d81d215803

9 years agoUndefine _Atomic before redefining
Hans Boehm [Tue, 26 Aug 2014 22:58:15 +0000 (15:58 -0700)]
Undefine _Atomic before redefining

Stdatomic.h was potentially redefining _Atomic, in spite of a
prior definition by <atomic>.  This could cause g++ builds that
included <stdatomic.h> with an available <atomic> header to break.

A functional stdatomic.h is a prerequisite for fixing the
following bugs.  This is the middle of 3 AOSP updates to
bionics stdatomic.h that are needded to get there.

Bug:16880454
Bug:16513433

Change-Id: I562c7115118c0587d594d4d5b62d25101e47bfd8
(cherry picked from commit 3e4a0099a179d7acee63d78c8fc4c3cc7b0bae42)

9 years agoFix, generalize stdatomic.h; improve test.
Hans Boehm [Tue, 19 Aug 2014 23:14:01 +0000 (16:14 -0700)]
Fix, generalize stdatomic.h; improve test.

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 00aaea364501b3b0abe58dae461136159df1e356)

9 years agoMerge "Look into ld_preloads before current library" into lmp-dev
Dmitriy Ivanov [Mon, 1 Sep 2014 21:08:54 +0000 (21:08 +0000)]
Merge "Look into ld_preloads before current library" into lmp-dev

9 years agoUse __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
Elliott Hughes [Fri, 29 Aug 2014 22:54:11 +0000 (15:54 -0700)]
Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.

Bug: 16874785

(cherry picked from commit e0c56efddf55ad40cb35b2c22e1dd9b4b50df159)

Change-Id: I9c922ba019f648766fc399d1c4e35e789e25acd4

9 years agoLook into ld_preloads before current library
Dmitriy Ivanov [Fri, 29 Aug 2014 17:15:25 +0000 (10:15 -0700)]
Look into ld_preloads before current library

 Change lookup order during relocation so that
 ld_preloads always precede caller (unless caller
 is main executable).

 Asan needs this change in order to intercept libc->libc
 calls.

Bug: 15432753
Change-Id: If69aa16efe59aa35bb30e96feb83d08f1efbec86

9 years agoHave pthread_attr_getstack for the main thread report RLIMIT_STACK...
Elliott Hughes [Wed, 27 Aug 2014 22:32:01 +0000 (15:32 -0700)]
Have pthread_attr_getstack for the main thread report RLIMIT_STACK...

...rather than just what's already mapped in. This seems somewhat
contrary to POSIX's "All pages within the stack described by stackaddr
and stacksize shall be both readable and writable by the thread", but
it's what glibc does.

Bug: 17111575

(cherry picked from commit 9e4ffa7032eaab308876b8e3da86b05c3c613878)

Change-Id: I73f219a569917b2e4546c09436d7ef5231facc07

9 years agoMerge "Fix pthread_getattr_np for the main thread." into lmp-dev
Elliott Hughes [Wed, 27 Aug 2014 23:49:56 +0000 (23:49 +0000)]
Merge "Fix pthread_getattr_np for the main thread." into lmp-dev

9 years agoMerge "Replace snprintf calls in linker." into lmp-dev
Christopher Ferris [Wed, 27 Aug 2014 22:42:11 +0000 (22:42 +0000)]
Merge "Replace snprintf calls in linker." into lmp-dev

9 years agoReplace snprintf calls in linker.
Christopher Ferris [Wed, 27 Aug 2014 03:48:11 +0000 (20:48 -0700)]
Replace snprintf calls in linker.

When enabling debug malloc, the snprintf calls in the linker fails to
update the buffer.

The problem is that snprintf makes a call to pthread_getspecific that
returns a valid pointer, but the data it points to is zero. This should
never happen and causes the snprintf to stop and do nothing.

Temporarily replace snprintf with a different implementation to work
around this issue.

Bug: 16874447
Bug: 17302493
Change-Id: I7a500f28adf153150cf2812fae745ff41f1c48d3

9 years agoMerge "call uselocale() before freelocale() to make sure that g_local_key has a valid...
Elliott Hughes [Wed, 27 Aug 2014 17:25:23 +0000 (17:25 +0000)]
Merge "call uselocale() before freelocale() to make sure that g_local_key has a valid locale." into lmp-dev

9 years agocall uselocale() before freelocale() to make sure that g_local_key has a valid locale.
Wally Yau [Tue, 26 Aug 2014 16:47:23 +0000 (09:47 -0700)]
call uselocale() before freelocale() to make sure that g_local_key has a valid locale.

For tests that call uselocale(), the locale is stored in the
g_userlocale_key thread-specific key. If freelocale() is called later,
then g_uselocal_key points to a deleted pointer. CTS eventually calls
vfprintf to print the result, which calls MB_CUR_MAX and MB_CUR_MAX
accesses the deleted locale stored in g_uselocale_key, causing unpredictable
errors.

Fixed the tests by calling uselocale() with the old locale before
calling freelocale.

Bug: 17299565
Change-Id: I87efa2a9b16999a11d587f68d3aeedcbe6ac8a2c

9 years agoUse the default unwind code.
Christopher Ferris [Tue, 26 Aug 2014 22:47:42 +0000 (15:47 -0700)]
Use the default unwind code.

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

9 years agoFix pthread_getattr_np for the main thread.
Elliott Hughes [Tue, 26 Aug 2014 00:26:50 +0000 (17:26 -0700)]
Fix pthread_getattr_np for the main thread.

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: Fengwei Yin <fengwei.yin@intel.com>
(cherry picked from commit 57b7a6110e7e8b446fc23cce4765ff625ee0a105)

Change-Id: I87e679ee1c0db8092f2d1221c8e7c1461545c5a4

9 years agoFix unistd.getpid_caching_and_clone.
Elliott Hughes [Fri, 22 Aug 2014 02:23:53 +0000 (19:23 -0700)]
Fix unistd.getpid_caching_and_clone.

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

9 years agoFix some 32-bit-isms in <stdio.h>.
Elliott Hughes [Wed, 20 Aug 2014 19:14:21 +0000 (12:14 -0700)]
Fix some 32-bit-isms in <stdio.h>.

Bug: 17157793
Change-Id: I8290e240b92e5617f4c12c0eacad6e622e677b6a

9 years agoExpose android_set_abort_message().
Dan Albert [Mon, 18 Aug 2014 21:37:42 +0000 (14:37 -0700)]
Expose android_set_abort_message().

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 ce6b1abbb1da797e716d8ec03da4e3b6304fd11d)
(cherry picked from commit 3a25ab952befbe908f6df45805683ebe3bf65863)

9 years agoMerge "Revert "Add support for protected local symbol lookup."" into lmp-dev
Dmitriy Ivanov [Tue, 19 Aug 2014 12:14:39 +0000 (12:14 +0000)]
Merge "Revert "Add support for protected local symbol lookup."" into lmp-dev

9 years agoRevert "Add support for protected local symbol lookup."
Dmitriy Ivanov [Mon, 18 Aug 2014 22:08:51 +0000 (15:08 -0700)]
Revert "Add support for protected local symbol lookup."

This reverts commit d97e9f546ea195686a78e539315b273393609b9e.

Bug: 17107521
Change-Id: I2b81ce2b5a4a2d166133a2626e49d81b6aef3672

9 years agoHide C++ stuff in libc. Put it back in libstdc++.
Dan Albert [Fri, 15 Aug 2014 21:20:04 +0000 (14:20 -0700)]
Hide C++ stuff in libc. Put it back in libstdc++.

Bug: 17062445
Change-Id: I027b186719654c2865b08c3fa83f90fa00c1e838
(cherry picked from commit fd5ee9aebc0a43c7f36a0778c7f416b39ddb870e)

9 years agoMerge "Fix leak_realloc, copy entire allocation." into lmp-dev
Christopher Ferris [Mon, 18 Aug 2014 18:57:39 +0000 (18:57 +0000)]
Merge "Fix leak_realloc, copy entire allocation." into lmp-dev

9 years agoFix leak_realloc, copy entire allocation.
Christopher Ferris [Sat, 16 Aug 2014 01:42:58 +0000 (18:42 -0700)]
Fix leak_realloc, copy entire allocation.

Bug: 16874447
Change-Id: Ie54a73fd75529961195fa5173d9116d0ae897b03

9 years agoMerge "Keep symbols for linker" into lmp-dev
Dmitriy Ivanov [Fri, 15 Aug 2014 21:29:48 +0000 (21:29 +0000)]
Merge "Keep symbols for linker" into lmp-dev

9 years agoKeep symbols for linker
Dmitriy Ivanov [Thu, 14 Aug 2014 22:46:36 +0000 (15:46 -0700)]
Keep symbols for linker

Bug: 17011146

(cherry picked from commit ad5e8b50737144833233d47fe04deb3fa0284df2)

Change-Id: Ib1d3f8d6d38af98586658e01ed1ec79d2c5b4d42

9 years agoHave stdatomic.h punt to C++ atomic when possible
Hans Boehm [Thu, 14 Aug 2014 22:26:03 +0000 (15:26 -0700)]
Have stdatomic.h punt to C++ atomic when possible

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 019d3958118b7dc3ec8444ad2accca50c268b737)

9 years agoMerge "Change name of MB_CUR_MAX implementation function." into lmp-dev
Dan Albert [Fri, 15 Aug 2014 01:14:19 +0000 (01:14 +0000)]
Merge "Change name of MB_CUR_MAX implementation function." into lmp-dev

9 years agoChange name of MB_CUR_MAX implementation function.
Dan Albert [Thu, 14 Aug 2014 20:56:51 +0000 (13:56 -0700)]
Change name of MB_CUR_MAX implementation function.

Glibc calls theirs __ctype_get_mb_cur_max. Make ours match to cut down
on differences between bionic and glibc.

Bug: 11156955
Change-Id: Ib7231f01aa9676dff30aea0af25d597bfe07bc73

9 years agoMerge "Move mtctxres.c to libc_dns.a." into lmp-dev
Dan Albert [Fri, 15 Aug 2014 01:14:13 +0000 (01:14 +0000)]
Merge "Move mtctxres.c to libc_dns.a." into lmp-dev

9 years agoMove mtctxres.c to libc_dns.a.
Dan Albert [Thu, 14 Aug 2014 22:43:25 +0000 (15:43 -0700)]
Move mtctxres.c to libc_dns.a.

Has the effect of making ___mtctxres hidden.

Bug: 11156955
Change-Id: I5aa5f49344ad5ecb33f48737430561b329bcbb0d
(cherry picked from commit 891ec7a6e46e60d7dfa1cf229e14a8e8634e272b)

9 years agoMerge "malloc_usable_size returns the original size." into lmp-dev
Christopher Ferris [Thu, 14 Aug 2014 21:43:11 +0000 (21:43 +0000)]
Merge "malloc_usable_size returns the original size." into lmp-dev

9 years agomalloc_usable_size returns the original size.
Christopher Ferris [Thu, 14 Aug 2014 19:48:04 +0000 (12:48 -0700)]
malloc_usable_size returns the original size.

Bug: 16874447
Change-Id: Ie3ce683fd1f58b837b8ea91dc798e561b8593356

9 years agoLabel pages mapped by linker_allocator
Dmitriy Ivanov [Fri, 8 Aug 2014 23:57:15 +0000 (16:57 -0700)]
Label pages mapped by linker_allocator

(cherry picked from commit 51a22a12ab370933a35463f5c81223132ec64dcb)

Bug: 17013324
Change-Id: I345c9d0fecc29d3626c5be01cc3c0ed1583ac361

9 years agoOptimize symbol lookup
Dmitriy Ivanov [Wed, 13 Aug 2014 04:02:13 +0000 (21:02 -0700)]
Optimize symbol lookup

 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 042426ba6375f5c145379e598486ec6d675533c9)

Change-Id: I69d59e395e8112f119343e8a4d72fe31cd449f31

9 years agoHide __libc_malloc_dispatch.
Dan Albert [Tue, 12 Aug 2014 23:21:26 +0000 (16:21 -0700)]
Hide __libc_malloc_dispatch.

Now that -Bsymbolic is fixed, we can hide __libc_malloc_dispatch without
breaking ASAN.

Bug: 11156955
Change-Id: Ia2fc9b046a74e666b33aa6c6c5435f70a63b8021

9 years agoFix our x86 PIC_PROLOGUE.
Elliott Hughes [Sun, 10 Aug 2014 01:45:55 +0000 (18:45 -0700)]
Fix our x86 PIC_PROLOGUE.

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

9 years agoMerge "Make __set_errno hidden in asm." into lmp-dev
Dan Albert [Sat, 9 Aug 2014 06:45:48 +0000 (06:45 +0000)]
Merge "Make __set_errno hidden in asm." into lmp-dev

9 years agoMake __set_errno hidden in asm.
Dan Albert [Fri, 8 Aug 2014 22:19:20 +0000 (15:19 -0700)]
Make __set_errno hidden in asm.

This fixes the build after the -Bsymbolic change.

Bug: 16853291
Change-Id: I989c9fec3c32e0289ea257a3bd2b7fd2709b6ce2
(cherry picked from commit bc9f9f25bf1247a6a638a2a2df8441bdd9fabad7)

9 years agoAdd a way to disable backtracing in malloc debug.
Christopher Ferris [Thu, 7 Aug 2014 23:21:21 +0000 (16:21 -0700)]
Add a way to disable backtracing in malloc debug.

The property libc.debug.malloc.nobacktrace set to non-zero disables
getting backtracing when using mode 1 or mode 10.

Bug: 16874447

Change-Id: I7650ba9f4385b5110b743cab01e877fc69545b3c

9 years agoAndroid is all-PIC/PIE.
Elliott Hughes [Thu, 7 Aug 2014 17:51:32 +0000 (10:51 -0700)]
Android is all-PIC/PIE.

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 6b6364a7fc7c3ba37ee907776a29bdc8c9793db9)

Change-Id: I89ca57fa0eb34a36de6cb11ea85f71054fce709d

9 years agoMerge "Do a second key cleanup in pthread_exit." into lmp-dev
Christopher Ferris [Thu, 7 Aug 2014 00:52:19 +0000 (00:52 +0000)]
Merge "Do a second key cleanup in pthread_exit." into lmp-dev

9 years agoDo a second key cleanup in pthread_exit.
Christopher Ferris [Wed, 6 Aug 2014 21:15:01 +0000 (14:15 -0700)]
Do a second key cleanup in pthread_exit.

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

9 years agoMerge "Upgrade bionic to tzdata2014f." into lmp-dev
Elliott Hughes [Thu, 7 Aug 2014 00:36:48 +0000 (00:36 +0000)]
Merge "Upgrade bionic to tzdata2014f." into lmp-dev

9 years agoMerge "Fix the tzdata update tools." into lmp-dev
Elliott Hughes [Thu, 7 Aug 2014 00:29:43 +0000 (00:29 +0000)]
Merge "Fix the tzdata update tools." into lmp-dev

9 years agoFix the tzdata update tools.
Elliott Hughes [Wed, 6 Aug 2014 22:23:11 +0000 (15:23 -0700)]
Fix the tzdata update tools.

The recent libcore ZoneInfo changes mean that we can no longer
compile libcore's ZoneInfo against the RI. Luckily, the field in
our data file that we needed ZoneInfo for isn't actually used.
This change removes our dependence on libcore.

I've left the field in to avoid a file format change. We can remove
the field if/when we next have a real need to bump the file format.

Bug: 16168653
Change-Id: Iedad2252c2b49f4d8bb2c7d9078b39b622444ca7

9 years agoUpgrade bionic to tzdata2014f.
Elliott Hughes [Wed, 6 Aug 2014 22:26:13 +0000 (15:26 -0700)]
Upgrade bionic to tzdata2014f.

From the release notes:

  Changes affecting future time stamps

    Russia will subtract an hour from most of its time zones on
    2014-10-26 at 02:00 local time.  (Thanks to Alexander Krivenyshev.)
    There are a few exceptions: Magadan Oblast (Asia/Magadan) and
    Zabaykalsky Krai are subtracting two hours; conversely, Chukotka
    Autonomous Okrug (Asia/Anadyr), Kamchatka Krai (Asia/Kamchatka),
    Kemerovo Oblast (Asia/Novokuznetsk), and the Samara Oblast and the
    Udmurt Republic (Europe/Samara) are not changing their clocks.  The
    changed zones are Europe/Kaliningrad, Europe/Moscow,
    Europe/Simferopol, Europe/Volgograd, Asia/Yekaterinburg, Asia/Omsk,
    Asia/Novosibirsk, Asia/Krasnoyarsk, Asia/Irkutsk, Asia/Yakutsk,
    Asia/Vladivostok, Asia/Khandyga, Asia/Sakhalin, and Asia/Ust-Nera;
    Asia/Magadan will have two hours subtracted; and Asia/Novokuznetsk's
    time zone abbreviation is affected, but not its UTC offset.  Two
    zones are added: Asia/Chita (split from Asia/Yakutsk, and also with
    two hours subtracted) and Asia/Srednekolymsk (split from
    Asia/Magadan, but with only one hour subtracted).  (Thanks to Tim
    Parenti for much of the above.)

  Changes affecting past time stamps

    China's five zones have been simplified to two, since the post-1970
    differences in the other three seem to have been imaginary.  The
    zones Asia/Harbin, Asia/Chongqing, and Asia/Kashgar have been
    removed; backwards-compatibility links still work, albeit with
    different behaviors for time stamps before May 1980.  Asia/Urumqi's
    1980 transition to UTC+8 has been removed, so that it is now at
    UTC+6 and not UTC+8.  (Thanks to Luther Ma and to Alois Treindl;
    Treindl sent helpful translations of two papers by Guo Qingsheng.)

    Some zones have been turned into links, when they differed from
    existing zones only for older UTC offsets where the data were likely
    invented.  These changes affect UTC offsets in pre-1970 time stamps
    only.  This is similar to the change in release 2013e, except this
    time for western Africa.  The affected zones are: Africa/Bamako,
    Africa/Banjul, Africa/Conakry, Africa/Dakar, Africa/Freetown,
    Africa/Lome, Africa/Nouakchott, Africa/Ouagadougou, Africa/Sao_Tome,
    and Atlantic/St_Helena.  This also affects the
    backwards-compatibility link Africa/Timbuktu.  (Thanks to Alan
    Barrett, Stephen Colebourne, Tim Parenti, and David Patte for
    reporting problems in earlier versions of this change.)

    Asia/Shanghai's pre-standard-time UT offset has been changed from
    8:05:57 to 8:05:43, the location of Xujiahui Observatory.  Its
    transition to standard time has been changed from 1928 to 1901.

    Asia/Taipei switched to JWST on 1896-01-01, then to JST on
    1937-10-01, then to CST on 1945-09-21 at 01:00, and did not observe
    DST in 1945.  In 1946 it observed DST from 05-15 through 09-30; in
    1947 from 04-15 through 10-31; and in 1979 from 07-01 through 09-30.
    (Thanks to Yu-Cheng Chuang.)

    Asia/Riyadh's transition to standard time is now 1947-03-14, not
    1950.

    Europe/Helsinki's 1942 fall-back transition was 10-04 at 01:00, not
    10-03 at 00:00.  (Thanks to Konstantin Hyppönen.)

    Pacific/Pago_Pago has been changed from UTC-11:30 to UTC-11 for the
    period from 1911 to 1950.

    Pacific/Chatham has been changed to New Zealand standard time plus
    45 minutes for the period before 1957, reflecting a 1956 remark in
    the New Zealand parliament.

    Europe/Budapest has several pre-1946 corrections: in 1918 the
    transition out of DST was on 09-16, not 09-29; in 1919 it was on
    11-24, not 09-15; in 1945 it was on 11-01, not 11-03; in 1941 the
    transition to DST was 04-08 not 04-06 at 02:00; and there was no DST
    in 1920.

    Africa/Accra is now assumed to have observed DST from 1920 through
    1935.

    Time in Russia before 1927 or so has been corrected by a few seconds
    in the following zones: Europe/Moscow, Asia/Irkutsk, Asia/Tbilisi,
    Asia/Tashkent, Asia/Vladivostok, Asia/Yekaterinburg,
    Europe/Helsinki, and Europe/Riga.  Also, Moscow's location has been
    changed to its Kilometer 0 point.  (Thanks to Vladimir Karpinsky for
    the Moscow changes.)

Bug: 16168653
Change-Id: I23827254bcf50dd07a2192ed34b02224d73e07a0

9 years agoMerge "Proper MB_CUR_MAX." into lmp-dev
Dan Albert [Wed, 6 Aug 2014 21:09:52 +0000 (21:09 +0000)]
Merge "Proper MB_CUR_MAX." into lmp-dev

9 years agoProper MB_CUR_MAX.
Dan Albert [Wed, 30 Jul 2014 17:53:48 +0000 (10:53 -0700)]
Proper MB_CUR_MAX.

Previously this was hard coded to 4. This is only the case for UTF-8
locales.

As a side effect, this properly reports C.UTF-8 as the default locale
instead of C.

Change-Id: I7c73cc8fe6ffac61d211cd5f75287e36de06f4fc
(cherry picked from commit 1aec7c1a35b2d03038b194967d5ebdc8e2c24b80)

9 years agoMerge "Fix mbsrtowcs(3) src param for finished string." into lmp-dev
Dan Albert [Wed, 6 Aug 2014 21:09:35 +0000 (21:09 +0000)]
Merge "Fix mbsrtowcs(3) src param for finished string." into lmp-dev

9 years agoFix mbsrtowcs(3) src param for finished string.
Dan Albert [Thu, 31 Jul 2014 18:31:03 +0000 (11:31 -0700)]
Fix mbsrtowcs(3) src param for finished string.

A mistake I made while cleaning this up the first time through.
mbstrtowcs(3) sets the src param to null if it finishes the string.

Change-Id: I6263646e25d9537043b7025fd1dd6ae195f365e2
(cherry picked from commit b6cc8e00cd562bd0f81fe44a6bc646540a862f32)

9 years agoFixes build.
Dan Albert [Tue, 5 Aug 2014 21:46:03 +0000 (14:46 -0700)]
Fixes build.

This change somehow went missing from the vfork change.

Change-Id: I807a2072080eac20601c694e85ba5723220289d8
(cherry picked from commit 9eae8405e8f70e489f2fe350a0212ab8114cbd17)

9 years agoRevert "Replaces vfork() implementation with fork()"
Dan Albert [Tue, 5 Aug 2014 20:53:31 +0000 (20:53 +0000)]
Revert "Replaces vfork() implementation with fork()"

We're getting cold feet on this one... let's put it back.

This reverts commit 210331d9762037afb9b5ed8413079c6f65872df9.

Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269
(cherry picked from commit 6a918870bab1a55a5f57dd7954abd9a8a27c1bc2)

9 years agoMerge "Workaround b/16818336 which fails build under aggressive inlining." into lmp-dev
Elliott Hughes [Wed, 6 Aug 2014 18:43:19 +0000 (18:43 +0000)]
Merge "Workaround b/16818336 which fails build under aggressive inlining." into lmp-dev

9 years agoWorkaround b/16818336 which fails build under aggressive inlining.
Dehao Chen [Tue, 5 Aug 2014 22:23:00 +0000 (15:23 -0700)]
Workaround b/16818336 which fails build under aggressive inlining.

Change-Id: Ifcd596714c427a2ec39502b9c0af9082ded91884

9 years agoMerge "Revert most of "Cleanup: Delete dead code."" into lmp-dev
Paul Jensen [Wed, 6 Aug 2014 18:32:02 +0000 (18:32 +0000)]
Merge "Revert most of "Cleanup: Delete dead code."" into lmp-dev

9 years agoExplain how wcswcs ended up in ndk_cruft.cpp.
Elliott Hughes [Wed, 6 Aug 2014 17:47:33 +0000 (10:47 -0700)]
Explain how wcswcs ended up in ndk_cruft.cpp.

(cherry picked from commit 1628eb1d43008c52b00ec98d10c4fd9e8b6fc7c5)

Change-Id: I335b35038781d0426b3647727e6c4f22c83e187b

9 years agoRevert most of "Cleanup: Delete dead code."
Paul Jensen [Wed, 6 Aug 2014 17:34:22 +0000 (17:34 +0000)]
Revert most of "Cleanup: Delete dead code."

This reverts most of commit 2582f02a01cd56c56a4e6c9de4444a6ec937cc37.
The DNS cache flushing code needs to be called when routes change.

Change-Id: I5b04121bc428cc6a2e136b6c3269c395bfb4981f
bug:16549455

9 years agoRevert "Revert "Fix dlsym(3) to do breadth first search.""
Dmitriy Ivanov [Mon, 4 Aug 2014 23:39:22 +0000 (23:39 +0000)]
Revert "Revert "Fix dlsym(3) to do breadth first search.""

This reverts commit 1b1966d9448e979d1503a3d8843708bfa8880dc6.

Change-Id: I05d6d3481aaf8f3e260d2e5e950248519a1d347f