OSDN Git Service

android-x86/bionic.git
9 years agoam 5f6bab1a: am af9da4a3: Merge "Replace snprintf calls in linker."
Christopher Ferris [Wed, 27 Aug 2014 23:53:09 +0000 (23:53 +0000)]
am 5f6bab1a: am af9da4a3: Merge "Replace snprintf calls in linker."

* commit '5f6bab1ac2212a23d8afd96dceb51b793b05dd2f':
  Replace snprintf calls in linker.

9 years agoam af9da4a3: Merge "Replace snprintf calls in linker."
Christopher Ferris [Wed, 27 Aug 2014 23:41:56 +0000 (23:41 +0000)]
am af9da4a3: Merge "Replace snprintf calls in linker."

* commit 'af9da4a343d8fe2456e9d861bbd75bba67f2193c':
  Replace snprintf calls in linker.

9 years agoam 2c449617: am fbe9d3df: Merge "Fix strlen function type for mips."
Chih-Hung Hsieh [Wed, 27 Aug 2014 23:36:22 +0000 (23:36 +0000)]
am 2c449617: am fbe9d3df: Merge "Fix strlen function type for mips."

* commit '2c449617c37c7b5419908499740530af2f1ca6f0':
  Fix strlen function type for mips.

9 years agoMerge "Replace snprintf calls in linker."
Christopher Ferris [Wed, 27 Aug 2014 23:29:18 +0000 (23:29 +0000)]
Merge "Replace snprintf calls in linker."

9 years agoam fbe9d3df: Merge "Fix strlen function type for mips."
Chih-Hung Hsieh [Wed, 27 Aug 2014 23:24:27 +0000 (23:24 +0000)]
am fbe9d3df: Merge "Fix strlen function type for mips."

* commit 'fbe9d3dfeb0e09c0e4aa3221aace8249c0efe881':
  Fix strlen function type for mips.

9 years agoam 80f47ca3: Merge branch \'lmp-dev-plus-aosp\' of https://googleplex-android.googles...
Yigit Boyar [Wed, 27 Aug 2014 23:13:49 +0000 (23:13 +0000)]
am 80f47ca3: Merge branch \'lmp-dev-plus-aosp\' of https://googleplex-android.googlesource.com/_direct/platform/bionic into lmp-dev-plus-aosp

* commit '80f47ca35cf54ac3de8b42b70d81189bd58080c7':
  Replace ambiguous cmp instruction with cmpl.

9 years agoam 04f12ef9: am 598d25bf: Merge "Replace snprintf calls in linker." into lmp-dev
Christopher Ferris [Wed, 27 Aug 2014 23:13:48 +0000 (23:13 +0000)]
am 04f12ef9: am 598d25bf: Merge "Replace snprintf calls in linker." into lmp-dev

* commit '04f12ef91c7f4235d6657583679f1dc39718344f':
  Replace snprintf calls in linker.

9 years agoMerge "Fix strlen function type for mips."
Chih-Hung Hsieh [Wed, 27 Aug 2014 23:07:54 +0000 (23:07 +0000)]
Merge "Fix strlen function type for mips."

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

(cherry pick from commit 172955a4e30b88ce8239a7ef426b4e8903e9923c)

Change-Id: Idca9d417978403d61debfd0434aaa82fd770f33b

9 years agoFix strlen function type for mips.
Chih-Hung Hsieh [Wed, 27 Aug 2014 21:13:09 +0000 (14:13 -0700)]
Fix strlen function type for mips.

Clang complains about incompatible-library-redeclaration.

BUG: 17302369
Change-Id: I3ae36f24846408c6464b84b5bddb1747e1e4a971

9 years agoMerge branch 'lmp-dev-plus-aosp' of https://googleplex-android.googlesource.com/_dire...
Yigit Boyar [Wed, 27 Aug 2014 23:00:12 +0000 (23:00 +0000)]
Merge branch 'lmp-dev-plus-aosp' of https://googleplex-android.googlesource.com/_direct/platform/bionic into lmp-dev-plus-aosp

9 years agoam 598d25bf: Merge "Replace snprintf calls in linker." into lmp-dev
Christopher Ferris [Wed, 27 Aug 2014 23:00:10 +0000 (23:00 +0000)]
am 598d25bf: Merge "Replace snprintf calls in linker." into lmp-dev

* commit '598d25bf78fa632e70cb80d4033572328f5bd1b7':
  Replace snprintf calls in linker.

9 years agoam 4f8268e3: Merge "Replace ambiguous cmp instruction with cmpl."
Chih-Hung Hsieh [Wed, 27 Aug 2014 23:00:09 +0000 (23:00 +0000)]
am 4f8268e3: Merge "Replace ambiguous cmp instruction with cmpl."

* commit '4f8268e38f151724722bcb489c32185a93fd86ba':
  Replace ambiguous cmp instruction with cmpl.

9 years agoMerge "Replace ambiguous cmp instruction with cmpl."
Chih-Hung Hsieh [Wed, 27 Aug 2014 22:46:06 +0000 (22:46 +0000)]
Merge "Replace ambiguous cmp instruction with cmpl."

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 agoam 2dc7fd03: am 34da32e7: Merge "Add missing type casts before comparison."
Chih-Hung Hsieh [Wed, 27 Aug 2014 22:13:22 +0000 (22:13 +0000)]
am 2dc7fd03: am 34da32e7: Merge "Add missing type casts before comparison."

* commit '2dc7fd03e77e32f85422786cc4bea157354d50be':
  Add missing type casts before comparison.

9 years agoam 34da32e7: Merge "Add missing type casts before comparison."
Chih-Hung Hsieh [Wed, 27 Aug 2014 22:05:14 +0000 (22:05 +0000)]
am 34da32e7: Merge "Add missing type casts before comparison."

* commit '34da32e7dd00270e98b845f8a810a6f12ffffb9b':
  Add missing type casts before comparison.

9 years agoReplace ambiguous cmp instruction with cmpl.
Chih-Hung Hsieh [Wed, 27 Aug 2014 22:04:23 +0000 (15:04 -0700)]
Replace ambiguous cmp instruction with cmpl.

Clang assembler rejects ambiguous cmp instruction.

BUG: 17302482
Change-Id: I74f49de87464541f9fe6fa288e4093a9fbf37120

9 years agoam 725fae1d: am 6ecd1cd1: Merge "Use the default unwind code."
Christopher Ferris [Wed, 27 Aug 2014 21:50:09 +0000 (21:50 +0000)]
am 725fae1d: am 6ecd1cd1: Merge "Use the default unwind code."

* commit '725fae1de487cb202d5429afb440541b79e8381e':
  Use the default unwind code.

9 years agoMerge "Add missing type casts before comparison."
Chih-Hung Hsieh [Wed, 27 Aug 2014 21:44:12 +0000 (21:44 +0000)]
Merge "Add missing type casts before comparison."

9 years agoam 6ecd1cd1: Merge "Use the default unwind code."
Christopher Ferris [Wed, 27 Aug 2014 21:35:16 +0000 (21:35 +0000)]
am 6ecd1cd1: Merge "Use the default unwind code."

* commit '6ecd1cd195546ecaf4317beda3f1a1a27f1d0d57':
  Use the default unwind code.

9 years agoMerge "Use the default unwind code."
Christopher Ferris [Wed, 27 Aug 2014 21:21:28 +0000 (21:21 +0000)]
Merge "Use the default unwind code."

9 years agoAdd missing type casts before comparison.
Chih-Hung Hsieh [Wed, 27 Aug 2014 20:45:37 +0000 (13:45 -0700)]
Add missing type casts before comparison.

BUG: 17300548
Change-Id: Ice9868f36c8fa8cd40bb13741b0e33c8f8d354fd

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

(cherry picked from commit 3f7635f4906c53fa744731efc35235456b7d93bf)

Change-Id: If8a3821cdd95ed481bb496bf2daab449d13790f8

9 years agoam 388369b7: Merge branch \'lmp-dev-plus-aosp\' of https://googleplex-android.googles...
Baligh Uddin [Wed, 27 Aug 2014 17:55:30 +0000 (17:55 +0000)]
am 388369b7: Merge branch \'lmp-dev-plus-aosp\' of https://googleplex-android.googlesource.com/_direct/platform/bionic into lmp-dev-plus-aosp

* commit '388369b788f93670551fe32233b6c4b55d3879d9':
  call uselocale() before freelocale() to make sure that g_local_key has a valid locale.
  Switch to OpenBSD <err.h> implementation.

9 years agoam b489ba48: am 6cc4e3b6: Merge "call uselocale() before freelocale() to make sure...
Elliott Hughes [Wed, 27 Aug 2014 17:55:29 +0000 (17:55 +0000)]
am b489ba48: am 6cc4e3b6: Merge "call uselocale() before freelocale() to make sure that g_local_key has a valid locale." into lmp-dev

* commit 'b489ba48a11ae91bd51bd99b3741ad452484684d':
  call uselocale() before freelocale() to make sure that g_local_key has a valid locale.

9 years agoMerge branch 'lmp-dev-plus-aosp' of https://googleplex-android.googlesource.com/_dire...
Baligh Uddin [Wed, 27 Aug 2014 17:39:51 +0000 (17:39 +0000)]
Merge branch 'lmp-dev-plus-aosp' of https://googleplex-android.googlesource.com/_direct/platform/bionic into lmp-dev-plus-aosp

9 years agoam cb322a11: Merge "call uselocale() before freelocale() to make sure that g_local_ke...
Elliott Hughes [Wed, 27 Aug 2014 17:39:29 +0000 (17:39 +0000)]
am cb322a11: Merge "call uselocale() before freelocale() to make sure that g_local_key has a valid locale."

* commit 'cb322a116804a690fdde6096d7efef4819151ad9':
  call uselocale() before freelocale() to make sure that g_local_key has a valid locale.

9 years agoam 64ae11ab: Merge "Switch to OpenBSD <err.h> implementation."
Elliott Hughes [Wed, 27 Aug 2014 17:39:28 +0000 (17:39 +0000)]
am 64ae11ab: Merge "Switch to OpenBSD <err.h> implementation."

* commit '64ae11ab766421fe2c49ebdecb14c36fe0a047fe':
  Switch to OpenBSD <err.h> implementation.

9 years agoam 6cc4e3b6: Merge "call uselocale() before freelocale() to make sure that g_local_ke...
Elliott Hughes [Wed, 27 Aug 2014 17:39:01 +0000 (17:39 +0000)]
am 6cc4e3b6: Merge "call uselocale() before freelocale() to make sure that g_local_key has a valid locale." into lmp-dev

* commit '6cc4e3b6ce726fb7aab6eff1ca8f4a28f9f21ee9':
  call uselocale() before freelocale() to make sure that g_local_key has a valid locale.

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

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.

(cherry-pick of 8a46cf0fcf82b8c76e05be7e066ec854f974603a.)

Bug: 17299565
Change-Id: I87efa2a9b16999a11d587f68d3aeedcbe6ac8a2c

9 years agoMerge "Switch to OpenBSD <err.h> implementation."
Elliott Hughes [Wed, 27 Aug 2014 17:26:02 +0000 (17:26 +0000)]
Merge "Switch to OpenBSD <err.h> implementation."

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 agoam 7bad1a90: am 3f7635f4: Use the default unwind code.
Christopher Ferris [Wed, 27 Aug 2014 04:55:00 +0000 (04:55 +0000)]
am 7bad1a90: am 3f7635f4: Use the default unwind code.

* commit '7bad1a90f1f270d5e2e3ca798d1e0f35c79bec6b':
  Use the default unwind code.

9 years agoam 3f7635f4: Use the default unwind code.
Christopher Ferris [Wed, 27 Aug 2014 04:46:05 +0000 (04:46 +0000)]
am 3f7635f4: Use the default unwind code.

* commit '3f7635f4906c53fa744731efc35235456b7d93bf':
  Use the default unwind code.

9 years agoam 3b32ba0e: am 6bfcefe0: Merge "Undefine _Atomic before redefining"
Hans Boehm [Wed, 27 Aug 2014 00:11:45 +0000 (00:11 +0000)]
am 3b32ba0e: am 6bfcefe0: Merge "Undefine _Atomic before redefining"

* commit '3b32ba0e2c1851e20f72a73c606dcbfc79e687bb':
  Undefine _Atomic before redefining

9 years agoam d961078f: am 07401c71: Merge "Switch to OpenBSD daemon(3)."
Elliott Hughes [Wed, 27 Aug 2014 00:11:45 +0000 (00:11 +0000)]
am d961078f: am 07401c71: Merge "Switch to OpenBSD daemon(3)."

* commit 'd961078f2d1ee42f41ae967d33ba583dd42475f8':
  Switch to OpenBSD daemon(3).

9 years agoam 3e95a0d6: am f1e64b5c: (-s ours) Merge "More cases where libc should use O_CLOEXEC."
Elliott Hughes [Wed, 27 Aug 2014 00:11:44 +0000 (00:11 +0000)]
am 3e95a0d6: am f1e64b5c: (-s ours) Merge "More cases where libc should use O_CLOEXEC."

* commit '3e95a0d6f0fb3e15485c4671643b4c61e89c49d3':
  More cases where libc should use O_CLOEXEC.

9 years agoam 6bfcefe0: Merge "Undefine _Atomic before redefining"
Hans Boehm [Wed, 27 Aug 2014 00:01:46 +0000 (00:01 +0000)]
am 6bfcefe0: Merge "Undefine _Atomic before redefining"

* commit '6bfcefe02f8fbeec1f6790bd5ebb1fdd5dba1e33':
  Undefine _Atomic before redefining

9 years agoam 07401c71: Merge "Switch to OpenBSD daemon(3)."
Elliott Hughes [Wed, 27 Aug 2014 00:01:45 +0000 (00:01 +0000)]
am 07401c71: Merge "Switch to OpenBSD daemon(3)."

* commit '07401c7136af113304a22f4a8245ef3fc1b6929b':
  Switch to OpenBSD daemon(3).

9 years agoam f1e64b5c: (-s ours) Merge "More cases where libc should use O_CLOEXEC."
Elliott Hughes [Wed, 27 Aug 2014 00:01:42 +0000 (00:01 +0000)]
am f1e64b5c: (-s ours) Merge "More cases where libc should use O_CLOEXEC."

* commit 'f1e64b5c171a374f36cd970df0c84558d4209e1c':
  More cases where libc should use O_CLOEXEC.

9 years agoSwitch to OpenBSD <err.h> implementation.
Elliott Hughes [Wed, 27 Aug 2014 00:00:37 +0000 (17:00 -0700)]
Switch to OpenBSD <err.h> implementation.

Change-Id: Ia950d88871a30f68e74f9ac7dbd87788e128e02f

9 years agoam f975bc2d: am 7b87d441: Merge "Switch to OpenBSD res_random."
Elliott Hughes [Tue, 26 Aug 2014 23:47:17 +0000 (23:47 +0000)]
am f975bc2d: am 7b87d441: Merge "Switch to OpenBSD res_random."

* commit 'f975bc2d59b064e08f5d01ecd0724cb76351727f':
  Switch to OpenBSD res_random.

9 years agoam 06b03394: am 59de803a: Merge "libc should use O_CLOEXEC when opening files for...
Elliott Hughes [Tue, 26 Aug 2014 23:47:16 +0000 (23:47 +0000)]
am 06b03394: am 59de803a: Merge "libc should use O_CLOEXEC when opening files for its own use."

* commit '06b033942ae7c6d967e4c58a4dd649e421598eba':
  libc should use O_CLOEXEC when opening files for its own use.

9 years agoam a04130f5: am 9f5dee55: Merge "Remove unnecessary calls to LinkedList::clear()"
Dmitriy Ivanov [Tue, 26 Aug 2014 23:47:15 +0000 (23:47 +0000)]
am a04130f5: am 9f5dee55: Merge "Remove unnecessary calls to LinkedList::clear()"

* commit 'a04130f54c087cf2ad2924863a8a1e5c22fdd8a9':
  Remove unnecessary calls to LinkedList::clear()

9 years agoam 7b87d441: Merge "Switch to OpenBSD res_random."
Elliott Hughes [Tue, 26 Aug 2014 23:41:23 +0000 (23:41 +0000)]
am 7b87d441: Merge "Switch to OpenBSD res_random."

* commit '7b87d441b0f2aa3ad5021ab6bd879a995a1bc2ce':
  Switch to OpenBSD res_random.

9 years agoam 59de803a: Merge "libc should use O_CLOEXEC when opening files for its own use."
Elliott Hughes [Tue, 26 Aug 2014 23:41:23 +0000 (23:41 +0000)]
am 59de803a: Merge "libc should use O_CLOEXEC when opening files for its own use."

* commit '59de803af98a284378303489f614be3e53800b3f':
  libc should use O_CLOEXEC when opening files for its own use.

9 years agoam 9f5dee55: Merge "Remove unnecessary calls to LinkedList::clear()"
Dmitriy Ivanov [Tue, 26 Aug 2014 23:41:22 +0000 (23:41 +0000)]
am 9f5dee55: Merge "Remove unnecessary calls to LinkedList::clear()"

* commit '9f5dee55aa401b11b3eb15806d3f8ffc291c2bb1':
  Remove unnecessary calls to LinkedList::clear()

9 years agoam 8e35e9e7: am d2bd3c47: Merge "Enable __cxa_atexit && __cxa_finalize for linker"
Dmitriy Ivanov [Tue, 26 Aug 2014 23:35:36 +0000 (23:35 +0000)]
am 8e35e9e7: am d2bd3c47: Merge "Enable __cxa_atexit && __cxa_finalize for linker"

* commit '8e35e9e73ee14fa8c725c83d871db2b58821d8c9':
  Enable __cxa_atexit && __cxa_finalize for linker

9 years agoMerge "Undefine _Atomic before redefining"
Hans Boehm [Tue, 26 Aug 2014 23:34:49 +0000 (23:34 +0000)]
Merge "Undefine _Atomic before redefining"

9 years agoMerge "Switch to OpenBSD daemon(3)."
Elliott Hughes [Tue, 26 Aug 2014 23:33:43 +0000 (23:33 +0000)]
Merge "Switch to OpenBSD daemon(3)."

9 years agoam d2bd3c47: Merge "Enable __cxa_atexit && __cxa_finalize for linker"
Dmitriy Ivanov [Tue, 26 Aug 2014 23:26:32 +0000 (23:26 +0000)]
am d2bd3c47: Merge "Enable __cxa_atexit && __cxa_finalize for linker"

* commit 'd2bd3c4717ed223bca1c68a87f243f4bcf492a4b':
  Enable __cxa_atexit && __cxa_finalize for linker

9 years agoSwitch to OpenBSD daemon(3).
Elliott Hughes [Tue, 26 Aug 2014 23:25:19 +0000 (16:25 -0700)]
Switch to OpenBSD daemon(3).

Change-Id: I1fd0be09fdb24aa6f1d945410eba5987f8a949b4

9 years agoMerge "More cases where libc should use O_CLOEXEC."
Elliott Hughes [Tue, 26 Aug 2014 23:23:58 +0000 (23:23 +0000)]
Merge "More cases where libc should use O_CLOEXEC."

9 years agoMore cases where libc should use O_CLOEXEC.
Elliott Hughes [Tue, 26 Aug 2014 23:20:59 +0000 (16:20 -0700)]
More cases where libc should use O_CLOEXEC.

Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0

9 years agoMerge "Switch to OpenBSD res_random."
Elliott Hughes [Tue, 26 Aug 2014 23:18:04 +0000 (23:18 +0000)]
Merge "Switch to OpenBSD res_random."

9 years agoMerge "libc should use O_CLOEXEC when opening files for its own use."
Elliott Hughes [Tue, 26 Aug 2014 23:11:45 +0000 (23:11 +0000)]
Merge "libc should use O_CLOEXEC when opening files for its own use."

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 agoMerge "Remove unnecessary calls to LinkedList::clear()"
Dmitriy Ivanov [Tue, 26 Aug 2014 23:00:43 +0000 (23:00 +0000)]
Merge "Remove unnecessary calls to LinkedList::clear()"

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.

Change-Id: I562c7115118c0587d594d4d5b62d25101e47bfd8

9 years agolibc should use O_CLOEXEC when opening files for its own use.
Elliott Hughes [Tue, 26 Aug 2014 22:56:54 +0000 (15:56 -0700)]
libc should use O_CLOEXEC when opening files for its own use.

Change-Id: I159f1d57e0ca090d837f57854fcef5879b8b8248

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

Change-Id: I981d2700cb17322c634b751715543fd33ee49b7c

9 years agoMerge "Enable __cxa_atexit && __cxa_finalize for linker"
Dmitriy Ivanov [Tue, 26 Aug 2014 22:53:15 +0000 (22:53 +0000)]
Merge "Enable __cxa_atexit && __cxa_finalize for linker"

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.

Change-Id: I5e1cd63fe3bf8f66de88cc4f7437cafb350f49b5

9 years agoam 05409ded: am c764fb24: Merge "Fix pthread_getattr_np for the main thread."
Elliott Hughes [Tue, 26 Aug 2014 20:18:50 +0000 (20:18 +0000)]
am 05409ded: am c764fb24: Merge "Fix pthread_getattr_np for the main thread."

* commit '05409dedcd6268d8150e5a39327b1b48711834c0':
  Fix pthread_getattr_np for the main thread.

9 years agoam c764fb24: Merge "Fix pthread_getattr_np for the main thread."
Elliott Hughes [Tue, 26 Aug 2014 20:08:44 +0000 (20:08 +0000)]
am c764fb24: Merge "Fix pthread_getattr_np for the main thread."

* commit 'c764fb24ccb47e05d8e140cde5b4111225790ef1':
  Fix pthread_getattr_np for the main thread.

9 years agoMerge "Fix pthread_getattr_np for the main thread."
Elliott Hughes [Tue, 26 Aug 2014 19:53:40 +0000 (19:53 +0000)]
Merge "Fix pthread_getattr_np for the main thread."

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>
Change-Id: I1d4dbffe7bc7bda1d353c3a295dbf68d29f63158

9 years agoam a9c435e0: am 9e307af9: Merge "Add standard throw() spec to delete operators."
Chih-Hung Hsieh [Mon, 25 Aug 2014 22:41:21 +0000 (22:41 +0000)]
am a9c435e0: am 9e307af9: Merge "Add standard throw() spec to delete operators."

* commit 'a9c435e072111d6e4a90748bb4a34f2c46814162':
  Add standard throw() spec to delete operators.

9 years agoam 9e307af9: Merge "Add standard throw() spec to delete operators."
Chih-Hung Hsieh [Mon, 25 Aug 2014 22:29:24 +0000 (22:29 +0000)]
am 9e307af9: Merge "Add standard throw() spec to delete operators."

* commit '9e307af982ea9030849293b5e3307733289e3c2c':
  Add standard throw() spec to delete operators.

9 years agoMerge "Add standard throw() spec to delete operators."
Chih-Hung Hsieh [Mon, 25 Aug 2014 22:08:32 +0000 (22:08 +0000)]
Merge "Add standard throw() spec to delete operators."

9 years agoAdd standard throw() spec to delete operators.
Chih-Hung Hsieh [Mon, 25 Aug 2014 19:08:19 +0000 (12:08 -0700)]
Add standard throw() spec to delete operators.

Without these specs, clang will reports mismatch between standard definitions and these declarations/definitions. These specs are ignored when compiled with -fno-exceptions.

BUG: 17136236
Change-Id: I386c712a61dc4fc74dfde45f9ec2d3d037f2e9f1

9 years agoam 685c722d: am a4a8c4fe: Merge "Fix, generalize stdatomic.h; improve test."
Hans Boehm [Fri, 22 Aug 2014 23:24:37 +0000 (23:24 +0000)]
am 685c722d: am a4a8c4fe: Merge "Fix, generalize stdatomic.h; improve test."

* commit '685c722d32086f0ded3da9975a934cef34f171c9':
  Fix, generalize stdatomic.h; improve test.

9 years agoam a4a8c4fe: Merge "Fix, generalize stdatomic.h; improve test."
Hans Boehm [Fri, 22 Aug 2014 23:15:54 +0000 (23:15 +0000)]
am a4a8c4fe: Merge "Fix, generalize stdatomic.h; improve test."

* commit 'a4a8c4feb8cf3cebf8aceace70e699e128095b5c':
  Fix, generalize stdatomic.h; improve test.

9 years agoMerge "Fix, generalize stdatomic.h; improve test."
Hans Boehm [Fri, 22 Aug 2014 22:52:31 +0000 (22:52 +0000)]
Merge "Fix, generalize stdatomic.h; improve test."

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.

Change-Id: If6a14c1075b379395ba5d93357d56025c0ffab68

9 years agoam 0c3ef375: am 9d34f6a9: Merge "Bump soinfo version"
Dmitriy Ivanov [Fri, 22 Aug 2014 21:13:57 +0000 (21:13 +0000)]
am 0c3ef375: am 9d34f6a9: Merge "Bump soinfo version"

* commit '0c3ef37501d32444ef333a960e306b33164fa31f':
  Bump soinfo version

9 years agoam 9d34f6a9: Merge "Bump soinfo version"
Dmitriy Ivanov [Fri, 22 Aug 2014 21:03:34 +0000 (21:03 +0000)]
am 9d34f6a9: Merge "Bump soinfo version"

* commit '9d34f6a90973bea086b4244df6eff74ab2211814':
  Bump soinfo version

9 years agoMerge "Bump soinfo version"
Dmitriy Ivanov [Fri, 22 Aug 2014 20:44:56 +0000 (20:44 +0000)]
Merge "Bump soinfo version"

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)

Change-Id: I1bf5fde4d930914012ce5f3ad5acb48217da9b2d

9 years agoam 740cf634: am 0b9fa4c9: Merge "Fix dlmalloc build."
Dan Albert [Fri, 22 Aug 2014 18:40:23 +0000 (18:40 +0000)]
am 740cf634: am 0b9fa4c9: Merge "Fix dlmalloc build."

* commit '740cf634f78141b37e30a37f9fdf491951d321e4':
  Fix dlmalloc build.

9 years agoam 0b9fa4c9: Merge "Fix dlmalloc build."
Dan Albert [Fri, 22 Aug 2014 18:25:06 +0000 (18:25 +0000)]
am 0b9fa4c9: Merge "Fix dlmalloc build."

* commit '0b9fa4c9bff5d3128f120a2008aa6997c7363b49':
  Fix dlmalloc build.

9 years agoam a2dcd944: am 4756afe3: Merge "Implement malloc_info(3)."
Dan Albert [Fri, 22 Aug 2014 18:16:29 +0000 (18:16 +0000)]
am a2dcd944: am 4756afe3: Merge "Implement malloc_info(3)."

* commit 'a2dcd9449e7afe93ee9472ea899539b17574908f':
  Implement malloc_info(3).

9 years agoMerge "Fix dlmalloc build."
Dan Albert [Fri, 22 Aug 2014 18:06:36 +0000 (18:06 +0000)]
Merge "Fix dlmalloc build."

9 years agoFix dlmalloc build.
Dan Albert [Fri, 22 Aug 2014 18:05:48 +0000 (11:05 -0700)]
Fix dlmalloc build.

Change-Id: Ied542c40867ab443cdd2076bd2e535b00c4854e4

9 years agoam 4756afe3: Merge "Implement malloc_info(3)."
Dan Albert [Fri, 22 Aug 2014 18:04:08 +0000 (18:04 +0000)]
am 4756afe3: Merge "Implement malloc_info(3)."

* commit '4756afe3d5017b50c89761c47f0da17a6799c81e':
  Implement malloc_info(3).

9 years agoMerge "Implement malloc_info(3)."
Dan Albert [Fri, 22 Aug 2014 17:39:18 +0000 (17:39 +0000)]
Merge "Implement malloc_info(3)."

9 years agoImplement malloc_info(3).
Dan Albert [Wed, 20 Aug 2014 16:16:57 +0000 (09:16 -0700)]
Implement malloc_info(3).

Expose jemalloc stats through the malloc_info(3) interface.

Bug: 16874689
Change-Id: I4358ac283002e60ff161107028d1a3fb1e9afb0a

9 years agoam 4592c5e9: Merge branch \'lmp-dev-plus-aosp\' of https://googleplex-android.googles...
Elliott Hughes [Fri, 22 Aug 2014 16:53:23 +0000 (16:53 +0000)]
am 4592c5e9: Merge branch \'lmp-dev-plus-aosp\' of https://googleplex-android.googlesource.com/_direct/platform/bionic into lmp-dev-plus-aosp

* commit '4592c5e993e2ee625b9cfdd8e50cce0be9042114':
  Fix unistd.getpid_caching_and_clone.

9 years agoam 021ce40c: am 84d0683a: Fix unistd.getpid_caching_and_clone.
Elliott Hughes [Fri, 22 Aug 2014 16:53:23 +0000 (16:53 +0000)]
am 021ce40c: am 84d0683a: Fix unistd.getpid_caching_and_clone.

* commit '021ce40c0ca98ccdd7daa4d468222b951da10c06':
  Fix unistd.getpid_caching_and_clone.

9 years agoMerge branch 'lmp-dev-plus-aosp' of https://googleplex-android.googlesource.com/_dire...
Elliott Hughes [Fri, 22 Aug 2014 16:42:23 +0000 (16:42 +0000)]
Merge branch 'lmp-dev-plus-aosp' of https://googleplex-android.googlesource.com/_direct/platform/bionic into lmp-dev-plus-aosp

9 years agoam 84d0683a: Fix unistd.getpid_caching_and_clone.
Elliott Hughes [Fri, 22 Aug 2014 16:42:17 +0000 (16:42 +0000)]
am 84d0683a: Fix unistd.getpid_caching_and_clone.

* commit '84d0683a824fa02dbaa6d1b56a79223804b54e80':
  Fix unistd.getpid_caching_and_clone.

9 years agoam 538db6d2: Merge "Fix unistd.getpid_caching_and_clone."
Elliott Hughes [Fri, 22 Aug 2014 16:42:15 +0000 (16:42 +0000)]
am 538db6d2: Merge "Fix unistd.getpid_caching_and_clone."

* commit '538db6d2e63b203622c49344488099eaa5062850':
  Fix unistd.getpid_caching_and_clone.

9 years agoMerge "Fix unistd.getpid_caching_and_clone."
Elliott Hughes [Fri, 22 Aug 2014 16:28:02 +0000 (16:28 +0000)]
Merge "Fix unistd.getpid_caching_and_clone."

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.

(cherry-pick of 84d0683a824fa02dbaa6d1b56a79223804b54e80.)

Bug: 16705621
Bug: 17170200
Change-Id: Ia92c871b15f7e45fc174bb59bc95540fd00ae745

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 agoam ab537ae5: am 2e6c5fc4: Merge "Remove _flush_cache(2) for mips64."
Dan Albert [Thu, 21 Aug 2014 22:26:46 +0000 (22:26 +0000)]
am ab537ae5: am 2e6c5fc4: Merge "Remove _flush_cache(2) for mips64."

* commit 'ab537ae574ba675d3b313c544f5cf5de0c6e77e7':
  Remove _flush_cache(2) for mips64.