android-sdk/platform-bionic.git
6 years agolibc: Add AF_RPMSG and PF_RPMSG d-lollipop-release
Vishal Mahaveer [Fri, 14 Nov 2014 19:17:14 +0000 (13:17 -0600)]
libc: Add AF_RPMSG and PF_RPMSG

Add AF_RPMSG and update AF_MAX accordingly.
Also add other missing families.

Change-Id: I6744e301abd687cda3f49f3c33785ec867e92489
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agoRevert "Revert "Reenable support for non-PIE executables""
Vishal Mahaveer [Mon, 10 Nov 2014 20:10:51 +0000 (14:10 -0600)]
Revert "Revert "Reenable support for non-PIE executables""

Enabling support for non-PIE execuatables.

/system/vendor/bin/pvrsrvinit is a non-PIE executable, Enable support for
non-PIE executables for time being.

This reverts commit 76e289c026f11126fc88841b3019fd5bb419bb67.

Change-Id: I3ac0a2bf0b991a1dddf23165313f2fe23720f596

6 years agomerge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313
The Android Automerger [Wed, 22 Oct 2014 00:42:56 +0000 (17:42 -0700)]
merge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313

6 years agomerge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313
The Android Automerger [Tue, 21 Oct 2014 13:09:30 +0000 (06:09 -0700)]
merge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313

6 years agomerge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313
The Android Automerger [Mon, 20 Oct 2014 00:07:47 +0000 (17:07 -0700)]
merge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313

6 years agomerge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313
The Android Automerger [Thu, 16 Oct 2014 13:09:40 +0000 (06:09 -0700)]
merge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313

6 years agomerge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313
The Android Automerger [Wed, 15 Oct 2014 13:09:27 +0000 (06:09 -0700)]
merge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313

6 years agomerge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313
The Android Automerger [Tue, 14 Oct 2014 13:09:28 +0000 (06:09 -0700)]
merge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313

6 years agomerge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313
The Android Automerger [Mon, 13 Oct 2014 13:09:26 +0000 (06:09 -0700)]
merge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313

6 years agomerge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313
The Android Automerger [Sun, 12 Oct 2014 13:09:31 +0000 (06:09 -0700)]
merge in lmp-release history after reset to c891e24073830e07ba7373dee554ff2c70e1d313

6 years agoAdd back symbols to fix Greed for Glory franchise.
Christopher Ferris [Fri, 10 Oct 2014 01:31:01 +0000 (18:31 -0700)]
Add back symbols to fix Greed for Glory franchise.

Bug: 17813018
Change-Id: Id939426ee5303117b9601e7915fcfec5024fc621

6 years agoRe-add dlmalloc for 32 bit.
Christopher Ferris [Thu, 9 Oct 2014 05:48:20 +0000 (22:48 -0700)]
Re-add dlmalloc for 32 bit.

It turns out that appportable has a version that calls dlmalloc directly.
Re-add the dlmalloc symbol for 32 bit only as a compatibility shim that
calls malloc.

Bug: 17881362
Change-Id: I8f20963b0b8d323489dc083e4063779e0d1d7447

6 years agomerge in lmp-release history after reset to 1543fdf616ddebee7819214437527f380e5c743b
The Android Automerger [Thu, 9 Oct 2014 13:09:26 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 1543fdf616ddebee7819214437527f380e5c743b

6 years agomerge in lmp-release history after reset to 1543fdf616ddebee7819214437527f380e5c743b
The Android Automerger [Wed, 8 Oct 2014 13:10:36 +0000 (06:10 -0700)]
merge in lmp-release history after reset to 1543fdf616ddebee7819214437527f380e5c743b

6 years agoWork around a bug in Immersion's libImmEmulatorJ.so.
Elliott Hughes [Tue, 7 Oct 2014 23:02:11 +0000 (16:02 -0700)]
Work around a bug in Immersion's libImmEmulatorJ.so.

This library calls pthread_mutex_lock and pthread_mutex_unlock with a NULL
pthread_mutex_t*. This gives them (and their users) one release to fix things.

Bug: 17443936

(cherry picked from commit 7d3f553f989f830976efa92ddc3c84661d4d42aa)

Change-Id: Ie26bbecd3a74d61113b51c18832872499b97ee86
(cherry picked from commit b5e7eba6d1b97e471996fcfe7dbde7cbba7512ef)

6 years agoam 40bc7cd4: (-s ours) DO NOT MERGE Re-add .save directive for arm assembler code.
Christopher Ferris [Tue, 7 Oct 2014 15:27:36 +0000 (15:27 +0000)]
am 40bc7cd4: (-s ours) DO NOT MERGE  Re-add .save directive for arm assembler code.

* commit '40bc7cd4ed9fb848a7b3d934f69669f64ceed707':
  DO NOT MERGE  Re-add .save directive for arm assembler code.

6 years agomerge in lmp-release history after reset to d11eac3455a059a092ceee92eda9905e1d661e94
The Android Automerger [Tue, 7 Oct 2014 13:09:29 +0000 (06:09 -0700)]
merge in lmp-release history after reset to d11eac3455a059a092ceee92eda9905e1d661e94

6 years agoForce export symbols on all x86 variants in libc.
Christopher Ferris [Mon, 6 Oct 2014 22:11:28 +0000 (15:11 -0700)]
Force export symbols on all x86 variants in libc.

For silvermont, the __popcountsi2 symbol does not get exported by libc.
But for atom, this symbol is exported. Since we already exported this symbol
for previous releases, it's better to just follow through and force
the export, but only for 32 bit. x86 64 bit will not export this symbol.

Bug: 17681440
Change-Id: I6c62245f0960910f64baaaf6d9d090bf3ea5f435

6 years agoForce export symbols on all x86 variants in libc.
Christopher Ferris [Mon, 6 Oct 2014 22:11:28 +0000 (15:11 -0700)]
Force export symbols on all x86 variants in libc.

For silvermont, the __popcountsi2 symbol does not get exported by libc.
But for atom, this symbol is exported. Since we already exported this symbol
for previous releases, it's better to just follow through and force
the export, but only for 32 bit. x86 64 bit will not export this symbol.

Bug: 17681440
Change-Id: I6c62245f0960910f64baaaf6d9d090bf3ea5f435

6 years agomerge in lmp-release history after reset to a508714800242b294291060641ed35d719bdc857
The Android Automerger [Mon, 6 Oct 2014 13:10:13 +0000 (06:10 -0700)]
merge in lmp-release history after reset to a508714800242b294291060641ed35d719bdc857

6 years agomerge in lmp-release history after reset to a508714800242b294291060641ed35d719bdc857
The Android Automerger [Sun, 5 Oct 2014 13:10:03 +0000 (06:10 -0700)]
merge in lmp-release history after reset to a508714800242b294291060641ed35d719bdc857

6 years agoReimplement clock(3) using clock_gettime(3)
Alex Van Brunt [Fri, 26 Sep 2014 20:32:47 +0000 (13:32 -0700)]
Reimplement clock(3) using clock_gettime(3)

Unlike times(), clock_gettime() is implemented as a vDSO on many architectures.
So, using clock_gettime() will return a more accurate time and do so with less
overhead because it does have the overhead of calling into the kernel.

It is also significantly more accurate because it measures the actual time in
nanoseconds rather than the number of ticks (typically 1 millisecond or more).

Bug: 17814435

(cherry picked from commit 8d0b2dbf2154d5da17ff09b1d4f864d281362ad2)

Change-Id: Id4945d9f387330518f78669809639952e9227ed9

6 years agoExplain why clock(3) isn't broken.
Elliott Hughes [Fri, 12 Sep 2014 23:33:37 +0000 (16:33 -0700)]
Explain why clock(3) isn't broken.

Bug: 17441123
Bug: 17814435

(cherry picked from commit f83c208b82c78dad07f4065f63bdd354f5ef9951)

Change-Id: I2065afe73b79a8d86404edee16e983625d902cdc

6 years agomerge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0
The Android Automerger [Wed, 1 Oct 2014 13:10:44 +0000 (06:10 -0700)]
merge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0

6 years agomerge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0
The Android Automerger [Tue, 30 Sep 2014 13:11:44 +0000 (06:11 -0700)]
merge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0

6 years agomerge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0
The Android Automerger [Mon, 29 Sep 2014 13:11:30 +0000 (06:11 -0700)]
merge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0

6 years agomerge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0
The Android Automerger [Sun, 28 Sep 2014 13:10:03 +0000 (06:10 -0700)]
merge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0

6 years agomerge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0
The Android Automerger [Thu, 25 Sep 2014 13:11:51 +0000 (06:11 -0700)]
merge in lmp-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0

6 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

6 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

6 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

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

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Wed, 24 Sep 2014 13:10:50 +0000 (06:10 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Tue, 23 Sep 2014 13:10:52 +0000 (06:10 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Mon, 22 Sep 2014 13:10:05 +0000 (06:10 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Sun, 21 Sep 2014 13:09:23 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 years agomerge in lmp-release history after reset to 44da474bb8b5c83dec0646d1a48b6c830c6bd6e5
The Android Automerger [Sun, 21 Sep 2014 04:00:37 +0000 (21:00 -0700)]
merge in lmp-release history after reset to 44da474bb8b5c83dec0646d1a48b6c830c6bd6e5

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Sat, 20 Sep 2014 13:09:46 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Thu, 18 Sep 2014 13:09:12 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Wed, 17 Sep 2014 13:09:56 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Tue, 16 Sep 2014 13:09:53 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 years agomerge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d
The Android Automerger [Mon, 15 Sep 2014 13:09:45 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d

6 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

6 years agomerge in lmp-release history after reset to 7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6
The Android Automerger [Sun, 14 Sep 2014 13:09:35 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6

6 years agomerge in lmp-release history after reset to 1d12f186edcaaf6ebd6ace1929baa23ce97a2ab8
The Android Automerger [Sat, 13 Sep 2014 15:42:01 +0000 (08:42 -0700)]
merge in lmp-release history after reset to 1d12f186edcaaf6ebd6ace1929baa23ce97a2ab8

6 years agomerge in lmp-release history after reset to 7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6
The Android Automerger [Sat, 13 Sep 2014 13:09:46 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6

6 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

6 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

6 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

6 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

6 years agomerge in lmp-release history after reset to 33a73bfa0712c483830e4c9abbf4d6a0551478bf
The Android Automerger [Thu, 11 Sep 2014 13:09:09 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 33a73bfa0712c483830e4c9abbf4d6a0551478bf

6 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

6 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

6 years agomerge in lmp-release history after reset to 7efad83d430f4d824f2aaa75edea5106f6ff8aae
The Android Automerger [Wed, 10 Sep 2014 13:09:15 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 7efad83d430f4d824f2aaa75edea5106f6ff8aae

6 years agomerge in lmp-release history after reset to 7efad83d430f4d824f2aaa75edea5106f6ff8aae
The Android Automerger [Tue, 9 Sep 2014 13:09:23 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 7efad83d430f4d824f2aaa75edea5106f6ff8aae

6 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

6 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

6 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

6 years agomerge in lmp-release history after reset to 47ed03f70c6c9addc7f05e4ee4dc71c96d215105
The Android Automerger [Mon, 8 Sep 2014 13:09:42 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 47ed03f70c6c9addc7f05e4ee4dc71c96d215105

6 years agomerge in lmp-release history after reset to 47ed03f70c6c9addc7f05e4ee4dc71c96d215105
The Android Automerger [Sun, 7 Sep 2014 13:08:57 +0000 (06:08 -0700)]
merge in lmp-release history after reset to 47ed03f70c6c9addc7f05e4ee4dc71c96d215105

6 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

6 years agomerge in lmp-release history after reset to dc3814bcf916b58ec11251a530c4ecacb6e2b7c9
The Android Automerger [Sat, 6 Sep 2014 15:50:41 +0000 (08:50 -0700)]
merge in lmp-release history after reset to dc3814bcf916b58ec11251a530c4ecacb6e2b7c9

6 years agomerge in lmp-release history after reset to 5beddb7d642524ecb6655ab2823caf2add679917
The Android Automerger [Sat, 6 Sep 2014 13:08:46 +0000 (06:08 -0700)]
merge in lmp-release history after reset to 5beddb7d642524ecb6655ab2823caf2add679917

6 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

6 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

6 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

6 years agomerge in lmp-release history after reset to 1e010d60397db706cd3d1c4d5701a2bced441aa8
The Android Automerger [Thu, 4 Sep 2014 13:09:31 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 1e010d60397db706cd3d1c4d5701a2bced441aa8

6 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

6 years agomerge in lmp-release history after reset to cb093d1f55701da419d1013cc3e6fbb8aea3e957
The Android Automerger [Wed, 3 Sep 2014 13:09:05 +0000 (06:09 -0700)]
merge in lmp-release history after reset to cb093d1f55701da419d1013cc3e6fbb8aea3e957

6 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

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

6 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

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

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

6 years agomerge in lmp-release history after reset to c191a8adee7ff000b6dd71ee336a12118e2a4733
The Android Automerger [Tue, 2 Sep 2014 13:09:09 +0000 (06:09 -0700)]
merge in lmp-release history after reset to c191a8adee7ff000b6dd71ee336a12118e2a4733

6 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

6 years agomerge in lmp-release history after reset to b2eb09a9ed9e08d9e49f4245d1959b2ca3fbaaf8
The Android Automerger [Mon, 1 Sep 2014 14:54:46 +0000 (07:54 -0700)]
merge in lmp-release history after reset to b2eb09a9ed9e08d9e49f4245d1959b2ca3fbaaf8

6 years agomerge in lmp-release history after reset to b2eb09a9ed9e08d9e49f4245d1959b2ca3fbaaf8
The Android Automerger [Sun, 31 Aug 2014 16:30:23 +0000 (09:30 -0700)]
merge in lmp-release history after reset to b2eb09a9ed9e08d9e49f4245d1959b2ca3fbaaf8

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 years agomerge in lmp-release history after reset to 3f7635f4906c53fa744731efc35235456b7d93bf
The Android Automerger [Wed, 27 Aug 2014 13:09:31 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 3f7635f4906c53fa744731efc35235456b7d93bf

6 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

6 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

6 years agomerge in lmp-release history after reset to 84d0683a824fa02dbaa6d1b56a79223804b54e80
The Android Automerger [Tue, 26 Aug 2014 13:09:09 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 84d0683a824fa02dbaa6d1b56a79223804b54e80

6 years agomerge in lmp-release history after reset to 84d0683a824fa02dbaa6d1b56a79223804b54e80
The Android Automerger [Mon, 25 Aug 2014 13:08:46 +0000 (06:08 -0700)]
merge in lmp-release history after reset to 84d0683a824fa02dbaa6d1b56a79223804b54e80

6 years agomerge in lmp-release history after reset to 84d0683a824fa02dbaa6d1b56a79223804b54e80
The Android Automerger [Sun, 24 Aug 2014 13:08:24 +0000 (06:08 -0700)]
merge in lmp-release history after reset to 84d0683a824fa02dbaa6d1b56a79223804b54e80

6 years agomerge in lmp-release history after reset to 84d0683a824fa02dbaa6d1b56a79223804b54e80
The Android Automerger [Sat, 23 Aug 2014 13:09:07 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 84d0683a824fa02dbaa6d1b56a79223804b54e80

6 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

6 years agomerge in lmp-release history after reset to 1506fc178e9dcd873eaf95535ac7625ebb59388f
The Android Automerger [Thu, 21 Aug 2014 13:09:26 +0000 (06:09 -0700)]
merge in lmp-release history after reset to 1506fc178e9dcd873eaf95535ac7625ebb59388f

6 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

6 years agomerge in lmp-release history after reset to 1506fc178e9dcd873eaf95535ac7625ebb59388f
The Android Automerger [Wed, 20 Aug 2014 13:08:54 +0000 (06:08 -0700)]
merge in lmp-release history after reset to 1506fc178e9dcd873eaf95535ac7625ebb59388f

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

6 years agomerge in lmp-release history after reset to 6df7b609984479c894be81140730578896dbdd8f
The Android Automerger [Tue, 19 Aug 2014 13:08:52 +0000 (06:08 -0700)]
merge in lmp-release history after reset to 6df7b609984479c894be81140730578896dbdd8f