OSDN Git Service

android-x86/bionic.git
8 years agoMerge "Fix race in malloc debug option free_track." am: 5f1de52
Christopher Ferris [Thu, 17 Mar 2016 18:51:11 +0000 (18:51 +0000)]
Merge "Fix race in malloc debug option free_track." am: 5f1de52
am: 199417d

* commit '199417d3677f7afab7485207d55f2e1b147649f8':
  Fix race in malloc debug option free_track.

8 years agoMerge "Fix race in malloc debug option free_track."
Christopher Ferris [Thu, 17 Mar 2016 18:05:47 +0000 (18:05 +0000)]
Merge "Fix race in malloc debug option free_track."
am: 5f1de52

* commit '5f1de52eca7d3892cec864d2dc46b1dfdecba891':
  Fix race in malloc debug option free_track.

8 years agoMerge "Fix race in malloc debug option free_track."
Christopher Ferris [Thu, 17 Mar 2016 17:52:54 +0000 (17:52 +0000)]
Merge "Fix race in malloc debug option free_track."

8 years agoMerge "Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used...
Douglas Leung [Thu, 17 Mar 2016 01:11:26 +0000 (01:11 +0000)]
Merge "Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used to calculate gp at the start of __memset_chk_fail." am: d057f44
am: d552147

* commit 'd552147809fb937addb7b3ed19f998e6060b5fec':
  Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used to calculate gp at the start of __memset_chk_fail.

8 years agoMerge "Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used...
Douglas Leung [Thu, 17 Mar 2016 01:09:08 +0000 (01:09 +0000)]
Merge "Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used to calculate gp at the start of __memset_chk_fail."
am: d057f44

* commit 'd057f449a0a3ad2f574d11ffce060d69db9fc019':
  Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used to calculate gp at the start of __memset_chk_fail.

8 years agoMerge "Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used...
Christopher Ferris [Thu, 17 Mar 2016 01:01:26 +0000 (01:01 +0000)]
Merge "Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used to calculate gp at the start of __memset_chk_fail."

8 years agoFix race in malloc debug option free_track.
Christopher Ferris [Wed, 16 Mar 2016 05:39:39 +0000 (22:39 -0700)]
Fix race in malloc debug option free_track.

The free track mechanism could fail if, at the same time a free occurs,
another thread is trying to free and verify the same allocation. This
doesn't work if the freed allocation is added to the list and we still
do work on it. The fix is to only add to the free list when we are done
with the allocation.

Also fix a problem where the usable size is computed incorrectly because
two of the arguments where reversed.

In addition, add a check that the allocation being verified has the correct
tag before trying to check the body of the allocation.

Add a test to catch the original failure.

Add a test for the tag being different.

Bug: 27601650
Change-Id: Ie9200677d066255b8e668a48422f23f909f4ddee

8 years agoFix bug where t9 is not correct when __memset_chk_fail is called.
Douglas Leung [Wed, 16 Mar 2016 23:59:23 +0000 (16:59 -0700)]
Fix bug where t9 is not correct when __memset_chk_fail is called.
t9 is used to calculate gp at the start of __memset_chk_fail.

Change-Id: Ief5018699e060afa691bfc1d861abd5e463ab80c

8 years agoMerge "Android.bp: Add missing <complex.h> functions." am: 18576fe
Dan Willemsen [Wed, 16 Mar 2016 23:05:23 +0000 (23:05 +0000)]
Merge "Android.bp: Add missing <complex.h> functions." am: 18576fe
am: 591c270

* commit '591c270f45434e5a95204f4fe1fd83da7ee4cdd3':
  Android.bp: Add missing <complex.h> functions.

8 years agoMerge "Android.bp: Add missing <complex.h> functions."
Dan Willemsen [Wed, 16 Mar 2016 23:03:04 +0000 (23:03 +0000)]
Merge "Android.bp: Add missing <complex.h> functions."
am: 18576fe

* commit '18576fea6917f7ff2affa06aa01dcbcb7228778d':
  Android.bp: Add missing <complex.h> functions.

8 years agoMerge "Android.bp: Add missing <complex.h> functions."
Dan Willemsen [Wed, 16 Mar 2016 22:52:57 +0000 (22:52 +0000)]
Merge "Android.bp: Add missing <complex.h> functions."

8 years agoAndroid.bp: Add missing <complex.h> functions.
Dan Willemsen [Wed, 16 Mar 2016 22:46:35 +0000 (15:46 -0700)]
Android.bp: Add missing <complex.h> functions.

Android.bp port of https://android-review.googlesource.com/207658

Change-Id: I4bedd193a20f7dfb97d0a8bbb67c8472e727be87

8 years agoMerge "Add missing <complex.h> functions." am: 8d0af0b
Elliott Hughes [Wed, 16 Mar 2016 18:57:17 +0000 (18:57 +0000)]
Merge "Add missing <complex.h> functions." am: 8d0af0b
am: 105de3b

* commit '105de3bcac9ec32dd10edc7374af7f96833b851e':
  Add missing <complex.h> functions.

8 years agoMerge "Fix PTHREAD_THREADS_MAX." am: b31d270
Elliott Hughes [Wed, 16 Mar 2016 18:57:17 +0000 (18:57 +0000)]
Merge "Fix PTHREAD_THREADS_MAX." am: b31d270
am: 97fe3bd

* commit '97fe3bdae9d331994c1d90a5463bc6f21d576858':
  Fix PTHREAD_THREADS_MAX.

8 years agoMerge "Add missing <complex.h> functions."
Elliott Hughes [Wed, 16 Mar 2016 18:55:02 +0000 (18:55 +0000)]
Merge "Add missing <complex.h> functions."
am: 8d0af0b

* commit '8d0af0bf8004c65f13b985643004a915d7e382eb':
  Add missing <complex.h> functions.

8 years agoMerge "Fix PTHREAD_THREADS_MAX."
Elliott Hughes [Wed, 16 Mar 2016 18:55:01 +0000 (18:55 +0000)]
Merge "Fix PTHREAD_THREADS_MAX."
am: b31d270

* commit 'b31d2705d564058f2ecb2434ea73bc7c35e1debf':
  Fix PTHREAD_THREADS_MAX.

8 years agoMerge "Add missing <complex.h> functions."
Elliott Hughes [Wed, 16 Mar 2016 18:12:33 +0000 (18:12 +0000)]
Merge "Add missing <complex.h> functions."

8 years agoMerge "Fix PTHREAD_THREADS_MAX."
Elliott Hughes [Wed, 16 Mar 2016 17:07:49 +0000 (17:07 +0000)]
Merge "Fix PTHREAD_THREADS_MAX."

8 years agoFix PTHREAD_THREADS_MAX.
Elliott Hughes [Wed, 16 Mar 2016 00:11:56 +0000 (17:11 -0700)]
Fix PTHREAD_THREADS_MAX.

We don't have a compile-time limit on the number of threads,
and we don't have a definite run-time limit either.

Bug: http://b/27617302
Change-Id: I6a6fe083e7b655d24eb9e7ef7f3e0280d483080b

8 years agoFix problem where unknown option is not an error. am: 4451b53c37
Christopher Ferris [Tue, 15 Mar 2016 19:33:51 +0000 (19:33 +0000)]
Fix problem where unknown option is not an error. am: 4451b53c37
am: 0cd410eb65

* commit '0cd410eb6593d4afddd742c1478272c7fd65428c':
  Fix problem where unknown option is not an error.

8 years agoFix problem where unknown option is not an error.
Christopher Ferris [Tue, 15 Mar 2016 19:29:40 +0000 (19:29 +0000)]
Fix problem where unknown option is not an error.
am: 4451b53c37

* commit '4451b53c3761b46fa33a3e47bfb0c62ca47e5fbb':
  Fix problem where unknown option is not an error.

8 years agoFix problem where unknown option is not an error.
Christopher Ferris [Mon, 14 Mar 2016 22:29:46 +0000 (15:29 -0700)]
Fix problem where unknown option is not an error.

If the first option is found, then any unknown options are simply
ignored, but do not produce an error. Fixed this so that each
option found is actually verified to exist.

Bug: 27620263

(cherry picked from commit a4b14252752d14454afb48feb3272e8689e3a66d)

Change-Id: I709774456283879e2a8aa5ce375899eaa79f6bc3

8 years agoMerge "Fix problem where unknown option is not an error." am: bca25411b8
Christopher Ferris [Tue, 15 Mar 2016 17:57:26 +0000 (17:57 +0000)]
Merge "Fix problem where unknown option is not an error." am: bca25411b8
am: 3d7d47a96d

* commit '3d7d47a96d970c519742b42cc92ea67067a54f7b':
  Fix problem where unknown option is not an error.

8 years agoMerge "Fix problem where unknown option is not an error."
Christopher Ferris [Tue, 15 Mar 2016 17:55:07 +0000 (17:55 +0000)]
Merge "Fix problem where unknown option is not an error."
am: bca25411b8

* commit 'bca25411b882abc6ab0bf07d25266ba9f8e4d398':
  Fix problem where unknown option is not an error.

8 years agoMerge "Fix problem where unknown option is not an error."
Christopher Ferris [Tue, 15 Mar 2016 17:47:02 +0000 (17:47 +0000)]
Merge "Fix problem where unknown option is not an error."

8 years agoRemove missing DT_SONAME warning from the toast am: 19930d5f6e
Dimitry Ivanov [Tue, 15 Mar 2016 17:41:36 +0000 (17:41 +0000)]
Remove missing DT_SONAME warning from the toast am: 19930d5f6e
am: 612a230624

* commit '612a2306244921cbe77d16c21abdf23eb245faa2':
  Remove missing DT_SONAME warning from the toast

8 years agoRemove missing DT_SONAME warning from the toast
Dimitry Ivanov [Tue, 15 Mar 2016 17:36:59 +0000 (17:36 +0000)]
Remove missing DT_SONAME warning from the toast
am: 19930d5f6e

* commit '19930d5f6ef39e660d0cdab5e17445a7d3ed1310':
  Remove missing DT_SONAME warning from the toast

8 years agoRemove missing DT_SONAME warning from the toast
Dimitry Ivanov [Tue, 15 Mar 2016 05:14:23 +0000 (22:14 -0700)]
Remove missing DT_SONAME warning from the toast

Bug: http://b/27613086
Change-Id: I9410f07dbde002d936319516313b27f9794dd597

8 years agoMerge "Silence false positive warnings on GCC." am: 3f36834fe8
Josh Gao [Tue, 15 Mar 2016 02:56:50 +0000 (02:56 +0000)]
Merge "Silence false positive warnings on GCC." am: 3f36834fe8
am: 71cce4ef96

* commit '71cce4ef96178f549c1ea071af4c96233c1f83cb':
  Silence false positive warnings on GCC.

8 years agoMerge "Silence false positive warnings on GCC."
Josh Gao [Tue, 15 Mar 2016 02:54:34 +0000 (02:54 +0000)]
Merge "Silence false positive warnings on GCC."
am: 3f36834fe8

* commit '3f36834fe863ec525df6c7f206b23ea76728431e':
  Silence false positive warnings on GCC.

8 years agoSilence false positive warnings on GCC. am: f6756b50b1
Josh Gao [Tue, 15 Mar 2016 02:54:34 +0000 (02:54 +0000)]
Silence false positive warnings on GCC. am: f6756b50b1
am: 6e46646bef

* commit '6e46646bef14490a054e10c3503c4e254404dc03':
  Silence false positive warnings on GCC.

8 years agoSilence false positive warnings on GCC.
Josh Gao [Tue, 15 Mar 2016 02:51:49 +0000 (02:51 +0000)]
Silence false positive warnings on GCC.
am: f6756b50b1

* commit 'f6756b50b11e15876ee49e01a64110e39f7e6e76':
  Silence false positive warnings on GCC.

8 years agoSilence false positive warnings on GCC.
Josh Gao [Tue, 15 Mar 2016 01:15:15 +0000 (18:15 -0700)]
Silence false positive warnings on GCC.

We still use GCC to build the bionic unit tests into CTS, and it emits a
false positive -Wmissing-field-initializers warning for the C++11 aggregate
initialization syntax `Foo foo = {}`.

Bug: http://b/27656293
Change-Id: I016d8dae6d6cd28afe4bc19250c2a8fba908f8e6
(cherry picked from commit d7878529b80295625df610bd32dadf11d507e8c0)

8 years agoMerge "Silence false positive warnings on GCC."
Josh Gao [Tue, 15 Mar 2016 02:43:10 +0000 (02:43 +0000)]
Merge "Silence false positive warnings on GCC."

8 years agoSilence false positive warnings on GCC.
Josh Gao [Tue, 15 Mar 2016 01:15:15 +0000 (18:15 -0700)]
Silence false positive warnings on GCC.

We still use GCC to build the bionic unit tests into CTS, and it emits a
false positive -Wmissing-field-initializers warning for the C++11 aggregate
initialization syntax `Foo foo = {}`.

Bug: http://b/27656293
Change-Id: I016d8dae6d6cd28afe4bc19250c2a8fba908f8e6

8 years agoFix problem where unknown option is not an error.
Christopher Ferris [Mon, 14 Mar 2016 22:29:46 +0000 (15:29 -0700)]
Fix problem where unknown option is not an error.

If the first option is found, then any unknown options are simply
ignored, but do not produce an error. Fixed this so that each
option found is actually verified to exist.

Bug: 27620263
Change-Id: If58732df3285eeae72188162c505e0e202fada8c

8 years agoInit functions after debug malloc succeeds. am: c1f1828949
Christopher Ferris [Sat, 12 Mar 2016 22:36:22 +0000 (22:36 +0000)]
Init functions after debug malloc succeeds. am: c1f1828949
am: 68331a3333

* commit '68331a33338b305ad7be98f913313700e915c5e5':
  Init functions after debug malloc succeeds.

8 years agoInit functions after debug malloc succeeds.
Christopher Ferris [Sat, 12 Mar 2016 22:34:24 +0000 (22:34 +0000)]
Init functions after debug malloc succeeds.
am: c1f1828949

* commit 'c1f182894990ea76f3f3c0ab41cc104637532e71':
  Init functions after debug malloc succeeds.

8 years agoMerge "Init functions after debug malloc succeeds." am: 0e00c168ce
Christopher Ferris [Sat, 12 Mar 2016 21:25:28 +0000 (21:25 +0000)]
Merge "Init functions after debug malloc succeeds." am: 0e00c168ce
am: 2474f43b72

* commit '2474f43b7251e33c810157a87a887666a5c66f5c':
  Init functions after debug malloc succeeds.

8 years agoMerge "Init functions after debug malloc succeeds."
Christopher Ferris [Sat, 12 Mar 2016 21:23:32 +0000 (21:23 +0000)]
Merge "Init functions after debug malloc succeeds."
am: 0e00c168ce

* commit '0e00c168cea9c951df5ce47d25d8f042b9cc566a':
  Init functions after debug malloc succeeds.

8 years agoInit functions after debug malloc succeeds.
Christopher Ferris [Fri, 11 Mar 2016 20:27:02 +0000 (12:27 -0800)]
Init functions after debug malloc succeeds.

Do not initialize all of the global function pointers associated with
debug malloc until the initialization has completed correctly.

Bug: 27600760

(cherry picked from commit 20f2c1ebd5b5860e69772b228ccda756eafc1398)

Change-Id: Ibc45213f55be9c8e95fb838b583353cd090c8b88

8 years agoMerge "Init functions after debug malloc succeeds."
Christopher Ferris [Sat, 12 Mar 2016 21:15:34 +0000 (21:15 +0000)]
Merge "Init functions after debug malloc succeeds."

8 years agoAdd missing <complex.h> functions.
Elliott Hughes [Fri, 11 Mar 2016 22:49:13 +0000 (14:49 -0800)]
Add missing <complex.h> functions.

FreeBSD doesn't seem interested in having low-quality implementations of
these functions:

  cacoshl, cacosl, casinhl, casinl, catanhl, catanl, ccoshl, ccosl, cexpl,
  clog, clogf, clogl, cpow, cpowf, cpowl, csinhl, csinl, ctanhl, ctanl.

And they still haven't got round to writing good implementations, so for
now let's just take the NetBSD ones so we have the full set.

Bug: http://b/27555792
Change-Id: I6b72003cf749b1043f006377a01fffe5e1d659bc

8 years agoMerge "Update Android.bp with x86 rint optimizations" am: 470de8f4d7
Dan Willemsen [Fri, 11 Mar 2016 21:17:14 +0000 (21:17 +0000)]
Merge "Update Android.bp with x86 rint optimizations" am: 470de8f4d7
am: b82a62ad10

* commit 'b82a62ad10e79821a900fae5ec83241db7d419c8':
  Update Android.bp with x86 rint optimizations

8 years agoMerge "Update Android.bp with x86 rint optimizations"
Dan Willemsen [Fri, 11 Mar 2016 21:15:13 +0000 (21:15 +0000)]
Merge "Update Android.bp with x86 rint optimizations"
am: 470de8f4d7

* commit '470de8f4d7b8e2e4a926f645870ab0419706fa78':
  Update Android.bp with x86 rint optimizations

8 years agoMerge "Update Android.bp with x86 rint optimizations"
Dan Willemsen [Fri, 11 Mar 2016 21:07:49 +0000 (21:07 +0000)]
Merge "Update Android.bp with x86 rint optimizations"

8 years agoUpdate Android.bp with x86 rint optimizations
Dan Willemsen [Fri, 11 Mar 2016 21:01:20 +0000 (13:01 -0800)]
Update Android.bp with x86 rint optimizations

Change-Id: Ie14a40301d6dd601b34b3f2341947daf6294e2cb

8 years agoInit functions after debug malloc succeeds.
Christopher Ferris [Fri, 11 Mar 2016 20:27:02 +0000 (12:27 -0800)]
Init functions after debug malloc succeeds.

Do not initialize all of the global function pointers associated with
debug malloc until the initialization has completed correctly.

Bug: 27600760
Change-Id: I0621b54bc2d9fab63805d7992d384e550d6fed2a

8 years agoMerge changes I3f1c1310,Ia8dc3481,I6b19fd63 am: 6a20add813
Colin Cross [Fri, 11 Mar 2016 01:29:17 +0000 (01:29 +0000)]
Merge changes I3f1c1310,Ia8dc3481,I6b19fd63 am: 6a20add813
am: 26faec50b2

* commit '26faec50b2669d558644f455a29a51fcafc3b817':
  malloc_debug: fix multiplication overflow in debug_calloc
  malloc_debug: round 0 byte allocations up to 1 byte
  malloc_debug: iterate: use usable_size

8 years agoMerge changes I3f1c1310,Ia8dc3481,I6b19fd63
Colin Cross [Fri, 11 Mar 2016 01:26:08 +0000 (01:26 +0000)]
Merge changes I3f1c1310,Ia8dc3481,I6b19fd63
am: 6a20add813

* commit '6a20add8136864b858955f6721fd3c0665f99036':
  malloc_debug: fix multiplication overflow in debug_calloc
  malloc_debug: round 0 byte allocations up to 1 byte
  malloc_debug: iterate: use usable_size

8 years agoMerge changes I3f1c1310,Ia8dc3481,I6b19fd63
Colin Cross [Fri, 11 Mar 2016 01:13:52 +0000 (01:13 +0000)]
Merge changes I3f1c1310,Ia8dc3481,I6b19fd63

* changes:
  malloc_debug: fix multiplication overflow in debug_calloc
  malloc_debug: round 0 byte allocations up to 1 byte
  malloc_debug: iterate: use usable_size

8 years agoMerge "Adjust test to let it pass on libhoudini." am: 7c66b17547
Yabin Cui [Fri, 11 Mar 2016 00:09:29 +0000 (00:09 +0000)]
Merge "Adjust test to let it pass on libhoudini." am: 7c66b17547
am: 67dfe07662

* commit '67dfe07662774f3c4adf594f21966b4083007bb5':
  Adjust test to let it pass on libhoudini.

8 years agoMerge "Adjust test to let it pass on libhoudini."
Yabin Cui [Fri, 11 Mar 2016 00:06:53 +0000 (00:06 +0000)]
Merge "Adjust test to let it pass on libhoudini."
am: 7c66b17547

* commit '7c66b1754731450c288f39dae5b67b60482dab5e':
  Adjust test to let it pass on libhoudini.

8 years agoMerge "Adjust test to let it pass on libhoudini."
Yabin Cui [Thu, 10 Mar 2016 23:58:32 +0000 (23:58 +0000)]
Merge "Adjust test to let it pass on libhoudini."

8 years agoMerge changes I3f1c1310,Ia8dc3481,I6b19fd63 into nyc-dev am: a2fa9c53e6
Colin Cross [Thu, 10 Mar 2016 22:58:31 +0000 (22:58 +0000)]
Merge changes I3f1c1310,Ia8dc3481,I6b19fd63 into nyc-dev am: a2fa9c53e6
am: b4e69f23d3

* commit 'b4e69f23d31d7570af2b7fff0e0e5c9d69e9584d':
  malloc_debug: fix multiplication overflow in debug_calloc
  malloc_debug: round 0 byte allocations up to 1 byte
  malloc_debug: iterate: use usable_size

8 years agoMerge changes I3f1c1310,Ia8dc3481,I6b19fd63 into nyc-dev
Colin Cross [Thu, 10 Mar 2016 22:55:50 +0000 (22:55 +0000)]
Merge changes I3f1c1310,Ia8dc3481,I6b19fd63 into nyc-dev
am: a2fa9c53e6

* commit 'a2fa9c53e688eef2d4343df7e5ab03f6765397c4':
  malloc_debug: fix multiplication overflow in debug_calloc
  malloc_debug: round 0 byte allocations up to 1 byte
  malloc_debug: iterate: use usable_size

8 years agomalloc_debug: fix multiplication overflow in debug_calloc
Colin Cross [Thu, 10 Mar 2016 21:01:27 +0000 (13:01 -0800)]
malloc_debug: fix multiplication overflow in debug_calloc

The over flow check for nmemb * bytes in debug_calloc is incorrect,
use the builtin overflow functions to check for multiplication and
addition overflow.

Change-Id: I3f1c13102621bc5380be1f69caa88dba2118f3cb
(cherry picked from commit 239838608dbe9917acddfe5a51d92350a4c8e135)

8 years agomalloc_debug: round 0 byte allocations up to 1 byte
Colin Cross [Thu, 10 Mar 2016 01:56:14 +0000 (17:56 -0800)]
malloc_debug: round 0 byte allocations up to 1 byte

0 byte allocations can cause problems if they are immediately followed
by another allocation with no header, as both allocations will have the
same address.  Treat 0 byte allocations as 1 byte allocations so that
debug_iterate will return separate addresses for them.

Bug: 27578580
Change-Id: Ia8dc3481fa7062391e9b3ae58a36e8d47e7ee557
(cherry picked from commit 15af478080cfbfa800fb8172fdf70a84075925e3)

8 years agomalloc_debug: iterate: use usable_size
Colin Cross [Thu, 10 Mar 2016 00:33:44 +0000 (16:33 -0800)]
malloc_debug: iterate: use usable_size

malloc_iterate with malloc debug enabled was returning allocation sizes
using the requested size instead of usable size.  If anything wrote
pointers above the requested size but below the usable size, those
pointers would be invisible to libmemunreachable and referenced
allocations could be reported as a leak.

Bug: 27107100
Change-Id: I6b19fd631f68ce93b3aee408cc3d296ec457bd01
(cherry picked from commit b23c6606d2326f8835fc7fc35b23ff7ee5a48f48)

8 years agoMerge changes I3f1c1310,Ia8dc3481,I6b19fd63 into nyc-dev
Colin Cross [Thu, 10 Mar 2016 22:49:50 +0000 (22:49 +0000)]
Merge changes I3f1c1310,Ia8dc3481,I6b19fd63 into nyc-dev

* changes:
  malloc_debug: fix multiplication overflow in debug_calloc
  malloc_debug: round 0 byte allocations up to 1 byte
  malloc_debug: iterate: use usable_size

8 years agoMerge "debuggerd: rethrow the full signal we receive, always." into nyc-dev am: 10793...
Josh Gao [Thu, 10 Mar 2016 22:48:04 +0000 (22:48 +0000)]
Merge "debuggerd: rethrow the full signal we receive, always." into nyc-dev am: 107935c558
am: f3f51b5849

* commit 'f3f51b584989f454a119f05720b95cbd9592a094':
  debuggerd: rethrow the full signal we receive, always.

8 years agoMerge "debuggerd: rethrow the full signal we receive, always." into nyc-dev
Josh Gao [Thu, 10 Mar 2016 22:45:25 +0000 (22:45 +0000)]
Merge "debuggerd: rethrow the full signal we receive, always." into nyc-dev
am: 107935c558

* commit '107935c5587f9c7c6cf475a5d63f1aa2e3f4d35e':
  debuggerd: rethrow the full signal we receive, always.

8 years agoMerge "debuggerd: rethrow the full signal we receive, always." into nyc-dev
Josh Gao [Thu, 10 Mar 2016 22:32:34 +0000 (22:32 +0000)]
Merge "debuggerd: rethrow the full signal we receive, always." into nyc-dev

8 years agomalloc_debug: fix multiplication overflow in debug_calloc
Colin Cross [Thu, 10 Mar 2016 21:01:27 +0000 (13:01 -0800)]
malloc_debug: fix multiplication overflow in debug_calloc

The over flow check for nmemb * bytes in debug_calloc is incorrect,
use the builtin overflow functions to check for multiplication and
addition overflow.

Change-Id: I3f1c13102621bc5380be1f69caa88dba2118f3cb

8 years agoAdjust test to let it pass on libhoudini.
Yabin Cui [Tue, 8 Mar 2016 01:44:58 +0000 (17:44 -0800)]
Adjust test to let it pass on libhoudini.

When using libhoudini to run arm code on x86 platforms, we can't
assume the main thread allocates local variables at the stack
declared by kernel.

Change-Id: Id9457f47fc338a3103fdee25a7a6e622915e7090

8 years agodebuggerd: rethrow the full signal we receive, always.
Josh Gao [Tue, 8 Mar 2016 23:27:15 +0000 (15:27 -0800)]
debuggerd: rethrow the full signal we receive, always.

The previous code assumed that returning would be sufficient to rethrow
signals like SIGSEGV. This is not true, for example,  in the case where a
SIGSEGV is sent via kill(2). We were previously only sending the signal
to ourselves in some cases, because using kill(2) would lose information
in the siginfo_t argument. Use rt_tgsigqueueinfo(2) instead to preserve
its contents.

Bug: http://b/27367422
Change-Id: I1be822818d5905461979c7e12dc4e9c25049273b
(cherry picked from commit 61cf3f3e033d2d7d13b06e0ae009ff12db787860)

8 years agoImprove and fix the stack-protector tests. am: 12393862e5
Elliott Hughes [Thu, 10 Mar 2016 19:40:36 +0000 (19:40 +0000)]
Improve and fix the stack-protector tests. am: 12393862e5
am: b960bbe590

* commit 'b960bbe59024ccbe4a1b82b288d4ded895932d5e':
  Improve and fix the stack-protector tests.

8 years agoImprove and fix the stack-protector tests.
Elliott Hughes [Thu, 10 Mar 2016 19:38:20 +0000 (19:38 +0000)]
Improve and fix the stack-protector tests.
am: 12393862e5

* commit '12393862e55b9ab28dd29ae16fbdf498371726a7':
  Improve and fix the stack-protector tests.

8 years agoresolve merge conflicts of a630784fe1 to nyc-dev-plus-aosp
Elliott Hughes [Thu, 10 Mar 2016 16:38:36 +0000 (16:38 +0000)]
resolve merge conflicts of a630784fe1 to nyc-dev-plus-aosp
am: e09c71818d

* commit 'e09c71818d8ba417b2df233c079d39520442c1e4':
  Switch bionic over to google-benchmark.

8 years agoresolve merge conflicts of a630784fe1 to nyc-dev-plus-aosp
Elliott Hughes [Thu, 10 Mar 2016 16:34:25 +0000 (08:34 -0800)]
resolve merge conflicts of a630784fe1 to nyc-dev-plus-aosp

Change-Id: Id174df5920ffbb11987b0c100fed3658b2ed7b9d

8 years agoMerge "Improve and fix the stack-protector tests." am: ffd19ee64d
Elliott Hughes [Thu, 10 Mar 2016 16:26:35 +0000 (16:26 +0000)]
Merge "Improve and fix the stack-protector tests." am: ffd19ee64d
am: 313c2b2993

* commit '313c2b2993d4eff50c52f6ec6988396b22e71e7f':
  Improve and fix the stack-protector tests.

8 years agoMerge "Improve and fix the stack-protector tests."
Elliott Hughes [Thu, 10 Mar 2016 16:24:38 +0000 (16:24 +0000)]
Merge "Improve and fix the stack-protector tests."
am: ffd19ee64d

* commit 'ffd19ee64d89d5a9ba3757e8ecb1017e0ec5f135':
  Improve and fix the stack-protector tests.

8 years agoImprove and fix the stack-protector tests.
Elliott Hughes [Fri, 4 Mar 2016 19:53:09 +0000 (11:53 -0800)]
Improve and fix the stack-protector tests.

Bug: http://b/26888853

(cherry picked from commit fc69a8ad5f0d9b63de48e3858fb4811ede7ac64e)

Change-Id: Ibc431076000b9a8db46f68f858480045b03b6e79

8 years agoMerge "Improve and fix the stack-protector tests."
Elliott Hughes [Thu, 10 Mar 2016 16:12:26 +0000 (16:12 +0000)]
Merge "Improve and fix the stack-protector tests."

8 years agomalloc_debug: round 0 byte allocations up to 1 byte
Colin Cross [Thu, 10 Mar 2016 01:56:14 +0000 (17:56 -0800)]
malloc_debug: round 0 byte allocations up to 1 byte

0 byte allocations can cause problems if they are immediately followed
by another allocation with no header, as both allocations will have the
same address.  Treat 0 byte allocations as 1 byte allocations so that
debug_iterate will return separate addresses for them.

Bug: 27578580
Change-Id: Ia8dc3481fa7062391e9b3ae58a36e8d47e7ee557

8 years agomalloc_debug: iterate: use usable_size
Colin Cross [Thu, 10 Mar 2016 00:33:44 +0000 (16:33 -0800)]
malloc_debug: iterate: use usable_size

malloc_iterate with malloc debug enabled was returning allocation sizes
using the requested size instead of usable size.  If anything wrote
pointers above the requested size but below the usable size, those
pointers would be invisible to libmemunreachable and referenced
allocations could be reported as a leak.

Bug: 27107100
Change-Id: I6b19fd631f68ce93b3aee408cc3d296ec457bd01

8 years agoMerge "debuggerd: rethrow the full signal we receive, always." am: 79c9ff28f9
Josh Gao [Thu, 10 Mar 2016 00:10:13 +0000 (00:10 +0000)]
Merge "debuggerd: rethrow the full signal we receive, always." am: 79c9ff28f9
am: 56d76ddc2c

* commit '56d76ddc2cb54fd5485a23ce99836c5566d7c2b1':
  debuggerd: rethrow the full signal we receive, always.

8 years agoMerge "debuggerd: rethrow the full signal we receive, always."
Josh Gao [Thu, 10 Mar 2016 00:08:08 +0000 (00:08 +0000)]
Merge "debuggerd: rethrow the full signal we receive, always."
am: 79c9ff28f9

* commit '79c9ff28f95b718db3ff5528b49e60e225fc56fd':
  debuggerd: rethrow the full signal we receive, always.

8 years agoMerge "debuggerd: rethrow the full signal we receive, always."
Josh Gao [Thu, 10 Mar 2016 00:00:54 +0000 (00:00 +0000)]
Merge "debuggerd: rethrow the full signal we receive, always."

8 years agodebuggerd: rethrow the full signal we receive, always.
Josh Gao [Tue, 8 Mar 2016 23:27:15 +0000 (15:27 -0800)]
debuggerd: rethrow the full signal we receive, always.

The previous code assumed that returning would be sufficient to rethrow
signals like SIGSEGV. This is not true, for example,  in the case where a
SIGSEGV is sent via kill(2). We were previously only sending the signal
to ourselves in some cases, because using kill(2) would lose information
in the siginfo_t argument. Use rt_tgsigqueueinfo(2) instead to preserve
its contents.

Bug: http://b/27367422
Change-Id: I1be822818d5905461979c7e12dc4e9c25049273b

8 years agoImprove and fix the stack-protector tests.
Elliott Hughes [Fri, 4 Mar 2016 19:53:09 +0000 (11:53 -0800)]
Improve and fix the stack-protector tests.

Bug: http://b/26888853
Change-Id: I505dbf7d5934f7247fb639f55dd6a9341df3947b

8 years agoMerge "Switch bionic over to google-benchmark." am: 2512310fd4
Elliott Hughes [Wed, 9 Mar 2016 20:45:51 +0000 (20:45 +0000)]
Merge "Switch bionic over to google-benchmark." am: 2512310fd4
am: 3623ffc03e

* commit '3623ffc03eed94d9473a127643fc88945b0ef3db':
  Switch bionic over to google-benchmark.

8 years agoMerge "Switch bionic over to google-benchmark."
Elliott Hughes [Wed, 9 Mar 2016 20:43:47 +0000 (20:43 +0000)]
Merge "Switch bionic over to google-benchmark."
am: 2512310fd4

* commit '2512310fd4a5fcc01e9c66bd44a87aeeac255fc2':
  Switch bionic over to google-benchmark.

8 years agoSwitch bionic over to google-benchmark.
Elliott Hughes [Wed, 17 Feb 2016 18:23:52 +0000 (10:23 -0800)]
Switch bionic over to google-benchmark.

Also removes the old benchmarking library.

(cherry picked from commit 281e06ba69ce6f591697acf65a24651050809920)

Bug: http://b/24803663
Change-Id: Idde5aa759b03d2b3cb51e32785beaf1c46476fa3

8 years agoMerge "Switch bionic over to google-benchmark."
Elliott Hughes [Wed, 9 Mar 2016 20:36:52 +0000 (20:36 +0000)]
Merge "Switch bionic over to google-benchmark."

8 years agoAdd x86 optimization of rint functions and tests am: fe88d4270b
jzha136 [Wed, 9 Mar 2016 16:51:02 +0000 (16:51 +0000)]
Add x86 optimization of rint functions and tests am: fe88d4270b
am: 7a83e34b99

* commit '7a83e34b99a8381d1f7baa7dfb1f0ec1fa1d8d1b':
  Add x86 optimization of rint functions and tests

8 years agoAdd x86 optimization of rint functions and tests
jzha136 [Wed, 9 Mar 2016 16:49:34 +0000 (16:49 +0000)]
Add x86 optimization of rint functions and tests
am: fe88d4270b

* commit 'fe88d4270b6ab5358b8e28decc848c496f67988c':
  Add x86 optimization of rint functions and tests

8 years agoMerge "Don\'t leak sockets if setsockopt() or fchown() fail." am: 192539f524
Erik Kline [Wed, 9 Mar 2016 05:07:56 +0000 (05:07 +0000)]
Merge "Don\'t leak sockets if setsockopt() or fchown() fail." am: 192539f524
am: b2727d8fa6

* commit 'b2727d8fa66d06945481aafacbfbd82f717212e3':
  Don't leak sockets if setsockopt() or fchown() fail.

8 years agoMerge "Don\'t leak sockets if setsockopt() or fchown() fail."
Erik Kline [Wed, 9 Mar 2016 05:04:02 +0000 (05:04 +0000)]
Merge "Don\'t leak sockets if setsockopt() or fchown() fail."
am: 192539f524

* commit '192539f5247925224e4bcaed28f44a5c59576f5d':
  Don't leak sockets if setsockopt() or fchown() fail.

8 years agoMerge "Don't leak sockets if setsockopt() or fchown() fail."
Erik Kline [Wed, 9 Mar 2016 04:18:22 +0000 (04:18 +0000)]
Merge "Don't leak sockets if setsockopt() or fchown() fail."

8 years agoDon't leak sockets if setsockopt() or fchown() fail.
Erik Kline [Fri, 4 Mar 2016 08:16:55 +0000 (17:16 +0900)]
Don't leak sockets if setsockopt() or fchown() fail.

Change-Id: Idcf8c08ff50d21c3a04b7ef80c4044f3f9762f2b

8 years agoMerge "Add x86 optimization of rint functions and tests" am: 55dc0c5eea
jzha136 [Tue, 8 Mar 2016 23:48:19 +0000 (23:48 +0000)]
Merge "Add x86 optimization of rint functions and tests" am: 55dc0c5eea
am: 14c067469e

* commit '14c067469eea859bcc30e905f9c911408ba06052':
  Add x86 optimization of rint functions and tests

8 years agoMerge "Add x86 optimization of rint functions and tests"
jzha136 [Tue, 8 Mar 2016 22:57:48 +0000 (22:57 +0000)]
Merge "Add x86 optimization of rint functions and tests"
am: 55dc0c5eea

* commit '55dc0c5eea04b13465951ef0354f9541123b0f94':
  Add x86 optimization of rint functions and tests

8 years agoAdd x86 optimization of rint functions and tests
jzha136 [Fri, 12 Jun 2015 16:15:02 +0000 (09:15 -0700)]
Add x86 optimization of rint functions and tests

Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
(cherry picked from commit f3ea093ebbfd9bd348ac16a46c96b637e3696c82)

Bug: http://b/27533895
Change-Id: I5703f4e2189bb1d12d8864757d72a327f17a74f9

8 years agoMerge "Add x86 optimization of rint functions and tests"
Elliott Hughes [Tue, 8 Mar 2016 22:01:07 +0000 (22:01 +0000)]
Merge "Add x86 optimization of rint functions and tests"

8 years agoMerge "Minor clock_getcpuclockid optimization." am: b83bd7bc25 am: 59eab81e16
Elliott Hughes [Tue, 8 Mar 2016 08:07:33 +0000 (08:07 +0000)]
Merge "Minor clock_getcpuclockid optimization." am: b83bd7bc25 am: 59eab81e16
am: 21499a07b4

* commit '21499a07b4d08b77edcad61c7486fb126d3be59d':
  Minor clock_getcpuclockid optimization.

8 years agoMerge "Minor clock_getcpuclockid optimization." am: b83bd7bc25
Elliott Hughes [Tue, 8 Mar 2016 08:03:33 +0000 (08:03 +0000)]
Merge "Minor clock_getcpuclockid optimization." am: b83bd7bc25
am: 59eab81e16

* commit '59eab81e16b190fb07d73d56eab1077b4b451653':
  Minor clock_getcpuclockid optimization.

8 years agoAdd x86 optimization of rint functions and tests
jzha136 [Fri, 12 Jun 2015 16:15:02 +0000 (09:15 -0700)]
Add x86 optimization of rint functions and tests

Change-Id: I5e7696ff9bcb1efc2625100ef8565b68dca2326c
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
8 years agoSwitch bionic over to google-benchmark.
Elliott Hughes [Wed, 17 Feb 2016 18:23:52 +0000 (10:23 -0800)]
Switch bionic over to google-benchmark.

Also removes the old benchmarking library.

Change-Id: I4791ae69fa5dea03644d3d411c60b7c6d1fceae3

8 years agoMerge "Minor clock_getcpuclockid optimization."
Elliott Hughes [Mon, 7 Mar 2016 21:17:00 +0000 (21:17 +0000)]
Merge "Minor clock_getcpuclockid optimization."
am: b83bd7bc25

* commit 'b83bd7bc256d5121ec3ff1babc3bc08d7f04eea2':
  Minor clock_getcpuclockid optimization.