OSDN Git Service
Dimitry Ivanov [Thu, 18 Feb 2016 00:08:03 +0000 (16:08 -0800)]
Move gdb support functions to a separate file
Move gdb support functions and variables to
linker_gdb_support.h/cpp
Bug: http://b/
27533895
Change-Id: I96c6592a7055715b18f1137367470fe80987263f
(cherry picked from commit
6b788eeff2ea0019849517e796b762ae790ca142)
Dimitry Ivanov [Wed, 17 Feb 2016 23:25:25 +0000 (15:25 -0800)]
Use insert_link_map_into_debug_map for executable
Use insert_link_map_into_debug_map to insert the main
executable's link_map to r_debug
Bug: http://b/
27533895
Change-Id: I0eacb3f030ea3eb16ed50ad2011d604beece2d03
(cherry picked from commit
f3064e4bc7f4dee351bc2eb9272db3e9792dc683)
Dimitry Ivanov [Wed, 17 Feb 2016 22:13:06 +0000 (14:13 -0800)]
Update a comment for init_linker_info_for_gdb
Bug: http://b/
27533895
Change-Id: I8e2895ecfcc6f77a180c3735342afc93be5923d3
(cherry picked from commit
6400129628ef24adb57fc4822d4fd54b8967701b)
Dimitry Ivanov [Tue, 16 Feb 2016 21:43:35 +0000 (13:43 -0800)]
Initialize linker link_map for gdb directly
Remove unnecessary construction of soinfo when
initializing linker link_map for gdb.
Bug: http://b/
27533895
Change-Id: Idf32cee56309aa9c9cf260efbd17a9deae9a756b
(cherry picked from commit
8d22dd53feddcc7a84e1cc481f171fd4dfe095a1)
Yabin Cui [Tue, 22 Mar 2016 20:45:55 +0000 (13:45 -0700)]
Fix pthread.pthread_barrier_smoke test.
pthread_barrier_smoke test uses WaitUntilThreadSleep() to wait until
BarrierTestHelper threads sleep in pthread_barrier_wait(). But this
is flaky as there a two futex_wait places in pthread_barrier_wait.
This patch modifies this test to avoid using WaitUntilThreadSleep().
Bug:
27780937
Bug:
27811377
Change-Id: I4c36b82cce9345d5088f8854b289dc5bf7a08e8c
(cherry picked from commit
81d2797e33d6f95c0b79e20ae8a04f2a4f3841cc)
Colin Cross [Fri, 25 Mar 2016 19:54:27 +0000 (19:54 +0000)]
Merge "Update Android.bp to match Android.mk" into nyc-dev
Elliott Hughes [Fri, 25 Mar 2016 15:29:05 +0000 (08:29 -0700)]
Fix the AT_HWCAP2 test.
"I have none of these capabilities" is a legitimate response, and
distinct from "I don't know what my capabilities are". It's the latter
I meant to test for.
Bug: http://b/
27810985
(cherry picked from commit
d4c91124906b6d73a2be336bbd305cd2678e04b2)
Change-Id: I4093948039a658e926e9b5e28d19b1344c70bd0e
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.
(cherry picked from commit
61e4d461e5c1c5108fdfe2a9f1edec6717e7461e)
Bug: http://b/
27815309
Change-Id: Ic714a8e633a0bb6e85b38ee0e01e3439d0a0cea5
Colin Cross [Thu, 24 Mar 2016 20:41:30 +0000 (13:41 -0700)]
Update Android.bp to match Android.mk
Change-Id: Ib5bbe66a398734b6db9a40d51f2849d1531853ef
Neil Fuller [Thu, 24 Mar 2016 15:22:09 +0000 (15:22 +0000)]
Revert "Update timezone data to 2016b"
The bionic change merged down from upstream but the
external/icu one didn't.
A replacement change will be submitted along with one for
external/icu.
This reverts commit
7bcee86edcc8cb0f969c719fed9bc3bd04de142f.
Change-Id: I0dd28e02231e6ebba5b61131b22889a1268a0675
Neil Fuller [Tue, 22 Mar 2016 17:30:35 +0000 (17:30 +0000)]
Update timezone data to 2016b
am:
7bcee86
* commit '
7bcee86edcc8cb0f969c719fed9bc3bd04de142f':
Update timezone data to 2016b
Neil Fuller [Tue, 22 Mar 2016 11:30:36 +0000 (11:30 +0000)]
Update timezone data to 2016b
Changes affecting future time stamps
New zones Europe/Astrakhan and Europe/Ulyanovsk for Astrakhan and
Ulyanovsk Oblasts, Russia, both of which will switch from +03 to +04 on
2016-03-27 at 02:00 local time. They need distinct zones since their
post-1970 histories disagree. New zone Asia/Barnaul for Altai Krai and
Altai Republic, Russia, which will switch from +06 to +07 on the same date
and local time. Also, Asia/Sakhalin moves from +10 to +11 on 2016-03-27
at 02:00. (Thanks to Alexander Krivenyshev for the heads-up, and to
Matt Johnson and Stepan Golosunov for followup.)
As a trial of a new system that needs less information to be made up,
the new zones use numeric time zone abbreviations like "+04"
instead of invented abbreviations like "ASTT".
Haiti will not observe DST in 2016. (Thanks to Jean Antoine via
Steffen Thorsen.)
Palestine's spring-forward transition on 2016-03-26 is at 01:00, not 00:00.
(Thanks to Hannah Kreitem.) Guess future transitions will be March's last
Saturday at 01:00, not March's last Friday at 24:00.
Changes affecting past time stamps
Europe/Chisinau observed DST during 1990, and switched from +04 to
+03 at 1990-05-06 02:00, instead of switching from +03 to +02.
(Thanks to Stepan Golosunov.)
1991 abbreviations in Europe/Samara should be SAMT/SAMST, not
KUYT/KUYST. (Thanks to Stepan Golosunov.)
The update produced (apparently benign) warnings from zic as suggested here:
http://mm.icann.org/pipermail/tz-announce/2016-March/000036.html
Bug:
27656428
Change-Id: Ibbf7237344c21d22a0f781f547fbc95b46623ece
Elliott Hughes [Sat, 19 Mar 2016 01:36:04 +0000 (18:36 -0700)]
Add a CTS test to ensure AT_HWCAP2 is reported.
This is important for performance of 32-bit ARM crypto code in apps.
Bug: http://b/
27750752
(cherry picked from commit
ebb4895c68f08bad682f90e66b041f1585d7bafa)
Change-Id: Iec69fe57b93da0480ef3bbd4c9e7882c8aa55011
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
(cherry picked from commit
d0919623a2ef56107590eca9a9522a250fb8bd4a)
Change-Id: Ie1aa4d9a829da9a96de9b8bd1cc8fc681e9cab15
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
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
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)
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
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
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
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
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)
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
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
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
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
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
Dimitry Ivanov [Mon, 7 Mar 2016 17:22:59 +0000 (17:22 +0000)]
Merge "Revert "libm: rename LIBC_PRIVATE to LIBC_DEPRECATED"" into nyc-dev
Dimitry Ivanov [Mon, 7 Mar 2016 17:13:34 +0000 (17:13 +0000)]
Revert "libm: rename LIBC_PRIVATE to LIBC_DEPRECATED"
Vendor blobs strike back.
This reverts commit
9721bb3f0b7c8c45f42d2874c908a177615f42b5.
Bug:
http://b/
27518190
Change-Id: I3fbe71123840edc51a1a804f6c8e83c84958192d
Josh Gao [Sat, 5 Mar 2016 02:04:41 +0000 (18:04 -0800)]
forkpty: set the output fd to -1 on the slave side.
glibc, FreeBSD, OpenBSD, and Darwin all just leave the fd unchanged and
possibly uninitialized. Setting it to -1 seems friendlier, though.
Bug: http://b/
27506278
Change-Id: I7acdc8eecbea4404d5fb4ba0b4d572245a323886
Elliott Hughes [Sat, 5 Mar 2016 02:25:57 +0000 (18:25 -0800)]
Don't call clock_getres in sysconf.
There are a hundred other reasons why we can't run on kernels old enough
to not have all the clocks covered by sysconf.
This was causing trouble for jemalloc 4.1.0 in a seccomp-constrained process
because jemalloc 4.1.0 introduced a call to sysconf that caused us to make
clock_getres syscalls for the first time, leading to SIGSYS.
Bug: http://b/
27408522
(cherry picked from commit
d2b8de2cd16ecd86c830d98c58bcf392475bd0b3)
Change-Id: Id46a0f2c2804c597a8c9091690a8a1fc4a65f4cd
Dimitry Ivanov [Fri, 4 Mar 2016 19:05:52 +0000 (11:05 -0800)]
libm: rename LIBC_PRIVATE to LIBC_DEPRECATED
Bug: http://b/
26386014
Change-Id: Ia32411ce779f9dcf2cf7910d8658ffa753c73af9
(cherry picked from commit
9296460bf4dc64d91a83032c8323816430048419)
Dimitry Ivanov [Fri, 4 Mar 2016 02:33:35 +0000 (02:33 +0000)]
Merge "Add libsqlite.so to the grey-list" into nyc-dev
Dimitry Ivanov [Fri, 4 Mar 2016 02:13:18 +0000 (18:13 -0800)]
Add libsqlite.so to the grey-list
Bug: http://b/
27152660
Bug: http://b/
26394120
Change-Id: I9f8f6eb8cf0d81ddf1b7769e306c08b927f3dad1
Josh Gao [Thu, 3 Mar 2016 03:45:29 +0000 (19:45 -0800)]
Add a checksum to jmp_buf on AArch64.
Bug: http://b/
27417786
Change-Id: I17c22dc28a46dd6b678b449b506b0da978f3793e
(cherry picked from commit
0c3655a864f33080ebbec1248c27a7ead87d6a28)
Josh Gao [Thu, 3 Mar 2016 03:03:17 +0000 (19:03 -0800)]
Add a checksum to jmp_buf on ARM.
Make it easier to diagnose applications mucking with the contents of
jmp_buf by checksumming its contents.
Bug: http://b/
27417786
Change-Id: I9989e2ea3979a36ae0bc4c9e1bacafddbacc731b
(cherry picked from commit
a4c69137c693c45fce4010ba61d69d7147f5dd9a)
Dimitry Ivanov [Wed, 2 Mar 2016 19:41:22 +0000 (11:41 -0800)]
libdl: Rename LIBC_PRIVATE to LIBC_PLATFORM
Bug: http://b/
26386014
Change-Id: I3255faac66a96867aed302e205e3644b40ce7750
(cherry picked from commit
98cdef39dccad972a527b274be08a1905047a39a)
Dimitry Ivanov [Wed, 2 Mar 2016 21:05:51 +0000 (13:05 -0800)]
Modify android_dlwarning function to use a callback
The previous implementation of android_dlwarning was not thread-safe
and could return a pointer soon to become invalid in some situations.
This change fixed the problem. I have also removed android_dlwarning
from the dlext.h header file in case we decide to keep
android_dlwarning in the final release.
Bug: http://b/
27453994
Change-Id: If6c896a80a17c4be0e18795e617712ad36a106fe
Elliott Hughes [Wed, 2 Mar 2016 01:27:12 +0000 (17:27 -0800)]
Fix getifaddrs' handling of point-to-point interfaces.
Also remove an if that implied that IFA_BROADCAST is a possibility for
AF_INET6.
The existing tests fail if you have a point-to-point interface configured,
so no new test necessary.
Bug: http://b/
27442503
(cherry picked from commit
ef925e50d38fe6f5499c1d0d24cca98bf88e5256)
Change-Id: I19c19d83a86d0a8004a6b45dea7febe9d6fb6a2e
Dimitry Ivanov [Tue, 1 Mar 2016 21:11:28 +0000 (13:11 -0800)]
linker: print "not accessible" error message to the log
Print properties of the namespace on "library is not accessible"
error to better diagnose problems with native library accessiblity
Bug: http://b/
27406143
Change-Id: Icf3d6c604f09dfa015de863fdb1267d343930d2a
Dimitry Ivanov [Tue, 1 Mar 2016 17:50:00 +0000 (17:50 +0000)]
Merge "Add android_dlwarning() method" into nyc-dev
Elliott Hughes [Mon, 29 Feb 2016 21:31:59 +0000 (13:31 -0800)]
Rewrite ifaddrs#getifaddrs_INET.
The old implementation was unnecessarily complex, and using the wrong ioctl
for point-to-point destination addresses.
Bug: http://b/
27313259
(cherry picked from commit
bf97770a8602ad50ac97a16b978f92c366595684)
Change-Id: Ifad01967d6b7f4bb1e0346a5bb352dbb524bf846
Christopher Ferris [Tue, 23 Feb 2016 03:23:26 +0000 (19:23 -0800)]
Move hard-coded values to constants.
Change all of the hard-coded config values to be defined constants.
Also make sure to use these constants in the usage output.
Bug:
26739265
(cherry picked from commit
549e52200b6af3c33cba7ef759ea98b49fa40082)
Change-Id: I07b7095cad9c47207a31d9b95e4013f4cb07ae0e
Dimitry Ivanov [Thu, 25 Feb 2016 23:22:04 +0000 (15:22 -0800)]
Add android_dlwarning() method
This is temporary method intended to use
for a toast message on preview and beta
releases. Will be removed before the
production release.
Bug: http://b/
27365747
Change-Id: I39cc716bb82863ae761b6821bcec77cce6db3781
Neil Fuller [Fri, 26 Feb 2016 14:37:43 +0000 (14:37 +0000)]
Merge "Update timezone data to 2016a" into nyc-dev
Neil Fuller [Wed, 24 Feb 2016 15:09:28 +0000 (15:09 +0000)]
Update timezone data to 2016a
Changes affecting future time stamps
America/Cayman will not observe daylight saving this year after all.
Revert our guess that it would. (Thanks to Matt Johnson.)
Asia/Chita switches from +0800 to +0900 on 2016-03-27 at 02:00.
(Thanks to Alexander Krivenyshev.)
Asia/Tehran now has DST predictions for the year 2038 and later,
to be March 21 00:00 to September 21 00:00. This is likely better
than predicting no DST, albeit off by a day every now and then.
Changes affecting past and future time stamps
America/Metlakatla switched from PST all year to AKST/AKDT on
2015-11-01 at 02:00. (Thanks to Steffen Thorsen.)
America/Santa_Isabel has been removed, and replaced with a
backward compatibility link to America/Tijuana. Its contents were
apparently based on a misreading of Mexican legislation.
Changes affecting past time stamps
Asia/Karachi's two transition times in 2002 were off by a minute.
(Thanks to Matt Johnson.)
Bug:
26833368
(cherry picked from commit
92057af535a8976b078b61eb58f894cd6f511fea)
Change-Id: I31985eb6101cf5d428ecaec70be4248c896a5b86
Neil Fuller [Thu, 25 Feb 2016 17:42:48 +0000 (17:42 +0000)]
Update timezone data to 2016a
am:
5408d8f39a
* commit '
5408d8f39aeaac1f477757f90b09cff32c641d56':
Update timezone data to 2016a
Neil Fuller [Wed, 24 Feb 2016 15:09:28 +0000 (15:09 +0000)]
Update timezone data to 2016a
Changes affecting future time stamps
America/Cayman will not observe daylight saving this year after all.
Revert our guess that it would. (Thanks to Matt Johnson.)
Asia/Chita switches from +0800 to +0900 on 2016-03-27 at 02:00.
(Thanks to Alexander Krivenyshev.)
Asia/Tehran now has DST predictions for the year 2038 and later,
to be March 21 00:00 to September 21 00:00. This is likely better
than predicting no DST, albeit off by a day every now and then.
Changes affecting past and future time stamps
America/Metlakatla switched from PST all year to AKST/AKDT on
2015-11-01 at 02:00. (Thanks to Steffen Thorsen.)
America/Santa_Isabel has been removed, and replaced with a
backward compatibility link to America/Tijuana. Its contents were
apparently based on a misreading of Mexican legislation.
Changes affecting past time stamps
Asia/Karachi's two transition times in 2002 were off by a minute.
(Thanks to Matt Johnson.)
Bug:
26833368
Change-Id: I5af1d69f8ca767369f1cbc4aa863280b960777e0
Christopher Ferris [Sat, 20 Feb 2016 02:13:29 +0000 (18:13 -0800)]
Fix incorrect size of array.
When using sscanf and "%4s", the array passed in must include space for
a nul terminator.
Bug:
26739265
(cherry picked from commit
f499dc91e774db4cb9d21f9a7c34704fa9b7ed39)
Change-Id: I8aac6fca3e5bc7a6399e2ed9c6ba4140a55ffdee
Colin Cross [Mon, 8 Feb 2016 22:29:03 +0000 (14:29 -0800)]
malloc_debug: reread /proc/pid/maps when entry is missing
Reread /proc/pid/maps on demand in case a new library has been loaded.
Bug:
27208635
(cherry picked from commit
d75d4bea54a788dada3f2538a33cc491e4c56ed4)
Change-Id: I80140cf57fa3b3e93d51dbe7b7a27595b72ee694
Colin Cross [Sat, 6 Feb 2016 00:17:39 +0000 (16:17 -0800)]
Add backtrace_string and export to libmemunreachable
Add backtrace_string to convert a malloc_debug backtrace to a string.
Also move the backtrace functions to libc_malloc_debug_backtrace so that
libmemunreachable can reuse them.
Bug:
27208635
(cherry picked from commit
2c75991359df165ca7cc7a6213fb227c0b5ed87c)
Change-Id: Ia93aaf010fbce1ace058439427066ea2dfd8bd13
Colin Cross [Tue, 2 Feb 2016 19:57:54 +0000 (11:57 -0800)]
Export malloc_backtrace
Bug:
27208635
(cherry picked from commit
2d4721c0c57fe2f7c1e1b40df4763a561b3cf856)
Change-Id: Ida926cabb706dfd962b692ba1775da332f68488f
Colin Cross [Fri, 29 Jan 2016 20:48:18 +0000 (12:48 -0800)]
Export malloc_iterate and friends
Export malloc_iterate, malloc_enable, and malloc_disable to be used by
libmemunreachable.
Bug:
27208635
(cherry picked from commit
869691c6f7691dd5bf343617aa185c32e0d3d160)
Change-Id: Ifa44421a84ac3be6a57fac28c4da501febe88c28
Colin Cross [Mon, 8 Feb 2016 06:51:15 +0000 (22:51 -0800)]
malloc_debug: reset TrackData mutex after fork
Add a pthread_atfork handler to malloc_debug to lock the TrackData mutex
during fork and reset it in the child. Ensures that the TrackData is
consistent when forking from a multi-threaded process, and that the
mutex is in a defined state in the child.
Bug:
27208635
(cherry picked from commit
7a28a3cf1f8df36e30724e8b4021cddde0596118)
Change-Id: I84bc67be09b8b767e1cf2f14141e2ae8dc4fb462
Christopher Ferris [Tue, 23 Feb 2016 03:14:26 +0000 (19:14 -0800)]
Fix wrong guard values for 64 bit.
I added the code to force alignments of 8 for 32 bit and 16 for 64 bit,
but I missed a couple of tests that failed due to this change. Fix the
failing tests.
Bug:
26739265
(cherry picked from commit
0e2a0265798ed47cbbf6977f0f84cf81d93173a6)
Change-Id: I21c3e26a340df6e427f06625e525b88b19b0cae1
Elliott Hughes [Wed, 17 Feb 2016 22:19:48 +0000 (14:19 -0800)]
Fix scope ids for link-local IPv6 addresses from getifaddrs(3).
Bug: http://b/
27219454
(cherry picked from commit
7dac8b8aabadbf2dcff20d3646e701728ba3777d)
Change-Id: I006ae68b928b5836d064c020a6db43dcc05add9e
Christopher Ferris [Thu, 18 Feb 2016 03:17:02 +0000 (19:17 -0800)]
Fix cfi directives for memmove/strlcpy.
Bug:
27227225
(cherry picked from commit
97b6e131fd85bb0ae321d9e5a8a613f5ee373cf4)
Change-Id: I9462340a478d9b699240703d8da5967000a33d08
Christopher Ferris [Thu, 18 Feb 2016 00:34:02 +0000 (16:34 -0800)]
Fix cfi directives in small strncmp case.
Bug:
27227225
(cherry picked from commit
de84e51f8c7b45869a8f83a1d5eacbf19b6d5eb5)
Change-Id: I7ebbd1cf9bff849ecdfc84e0e98842fec3215bb4
Christopher Ferris [Sat, 13 Feb 2016 01:24:27 +0000 (17:24 -0800)]
Add a memcpy(a, a, n) test.
clang depends on memcpy where src and dst are the same to actually
work. Even though this is, technically, undefined behavior,
clang is not going to change. Add a test to verify this assumption
holds true for android devices.
(cherry picked from commit
71766c25778fe13717259cdccb62463684794408)
Change-Id: I7d8ba4098729194dda69eab7070fd5c4ba1abbe9
Christopher Ferris [Thu, 11 Feb 2016 23:51:31 +0000 (15:51 -0800)]
Fix the default alignment of the allocations.
In order to enforce this constraint:
The pointer returned if the allocation succeeds shall be suitably
aligned so that it may be assigned to a pointer to any type of object
and then used to access such an object in the space allocated.
Force all allocations on 32 bit systems to have 8 byte alignment,
and all allocations on 64 bit systems to have 16 byte alignment.
Add a test to verify that the allocator returns the correct alignments.
Bug:
26739265
(cherry picked from commit
72df6708c829a4c6494936fdfbda6dc7e68e647b)
Change-Id: I44ca8bedb1dac375087da1af3a1d7d12034e037f
Elliott Hughes [Sat, 13 Feb 2016 00:00:53 +0000 (16:00 -0800)]
Fix regerror(..., nullptr, 0).
Found by passing a bad regular expression to the Google benchmark
code (https://github.com/google/benchmark).
(cherry picked from commit
cac2908b08f517802e719ddafe39f45c85c96a33)
Change-Id: I317a7c2ea6535998c0853029023fcefc88cb3750
Dimitry Ivanov [Fri, 12 Feb 2016 21:33:19 +0000 (13:33 -0800)]
Fix is_greylisted check in case of an absolute path
Some apps are explicitly calling System.loadLibrary(.)
for internal platform libraries like cutils.
Bug: http://b/
27100558
Change-Id: I765cf3fc542778d3b487069c9955d367840b3c05
Elliott Hughes [Thu, 11 Feb 2016 04:43:22 +0000 (20:43 -0800)]
Add tests for zero-sized allocations.
POSIX lets us return null and set errno, but that would be annoying and
surprising.
Bug: http://b/
27101951
(cherry picked from commit
884f76e3aa081740f7cfe582b11af7446bf77bd9)
Change-Id: Ice4fd3cd427523edc2ca4ba25caf9701c353db47
Elliott Hughes [Tue, 9 Feb 2016 01:00:12 +0000 (17:00 -0800)]
Update NOTICE files.
(cherry picked from commit
b4931cee769ca3c60a2cb77f68078df893286cf0)
Change-Id: I0aaa89f9b6d997936ef6d08c602795add9132057
Elliott Hughes [Sun, 7 Feb 2016 05:40:00 +0000 (05:40 +0000)]
Merge "Add a test for a possible overflow in *printf." am:
3dbdb9dbe6
am:
c32819f4ed
* commit '
c32819f4edced1cc9400ff932451865210ca15b6':
Add a test for a possible overflow in *printf.
Elliott Hughes [Sun, 7 Feb 2016 05:38:14 +0000 (05:38 +0000)]
Merge "Add a test for a possible overflow in *printf."
am:
3dbdb9dbe6
* commit '
3dbdb9dbe6907ebf322e7dae6df9fb3aadd4854b':
Add a test for a possible overflow in *printf.
Elliott Hughes [Sun, 7 Feb 2016 05:35:34 +0000 (05:35 +0000)]
Merge "Add a test for a possible overflow in *printf."
Mike Frysinger [Sat, 6 Feb 2016 19:34:50 +0000 (19:34 +0000)]
Merge "define pw_gecos to pw_passwd for LP32 systems" am:
9c212fc436
am:
52ce6c3bf4
* commit '
52ce6c3bf4b4e2ec2c6cf69f5706bad98e9e6b75':
define pw_gecos to pw_passwd for LP32 systems
Mike Frysinger [Sat, 6 Feb 2016 19:33:05 +0000 (19:33 +0000)]
Merge "define pw_gecos to pw_passwd for LP32 systems"
am:
9c212fc436
* commit '
9c212fc43617aeef5b1828407dd5d8daee506923':
define pw_gecos to pw_passwd for LP32 systems
Mike Frysinger [Sat, 6 Feb 2016 19:29:29 +0000 (19:29 +0000)]
Merge "define pw_gecos to pw_passwd for LP32 systems"
Mike Frysinger [Wed, 3 Feb 2016 19:40:37 +0000 (14:40 -0500)]
define pw_gecos to pw_passwd for LP32 systems
Since we set both fields to NULL all the time, we can alias the two
fields together on LP32 to provide build-time compatibility.
BUG=
24918750
TEST=python now builds for Brillo boards
Change-Id: I3394aea80c9a5288669389f71d0e4132f2157e3c
Elliott Hughes [Sat, 6 Feb 2016 05:57:37 +0000 (21:57 -0800)]
Add a test for a possible overflow in *printf.
It turns out we don't have any bugs here, but glibc does. Found while
chasing down a toybox failure I saw on the host, but we may as well
add the test in case we ever screw up here in future.
Change-Id: Ib8dd227ed3b742dc4dab8c09dc08e6ea9a35c807
Christopher Ferris [Sat, 6 Feb 2016 05:30:12 +0000 (05:30 +0000)]
Merge "Updated to v4.4.1 kernel headers." am:
831c8a5249
am:
e5df2f5f59
* commit '
e5df2f5f5911eecb64e1f32467e9d9c30aa73779':
Updated to v4.4.1 kernel headers.
Christopher Ferris [Sat, 6 Feb 2016 05:28:23 +0000 (05:28 +0000)]
Merge "Updated to v4.4.1 kernel headers."
am:
831c8a5249
* commit '
831c8a52498d3c7be204a00847275f6e9163626f':
Updated to v4.4.1 kernel headers.
Christopher Ferris [Sat, 6 Feb 2016 05:24:53 +0000 (05:24 +0000)]
Merge "Updated to v4.4.1 kernel headers."
Dan Willemsen [Sat, 6 Feb 2016 00:49:14 +0000 (00:49 +0000)]
Merge "Update Android.bp" am:
138a11c8a1
am:
5519f42dc1
* commit '
5519f42dc1f888ad5c269ec748e8d4844215e5fe':
Update Android.bp
Dan Willemsen [Sat, 6 Feb 2016 00:47:28 +0000 (00:47 +0000)]
Merge "Update Android.bp"
am:
138a11c8a1
* commit '
138a11c8a1687c72098ac9ceedfdf857426748cf':
Update Android.bp
Dan Willemsen [Sat, 6 Feb 2016 00:43:13 +0000 (00:43 +0000)]
Merge "Update Android.bp"
Christopher Ferris [Thu, 4 Feb 2016 21:16:38 +0000 (13:16 -0800)]
Updated to v4.4.1 kernel headers.
Small modifications needed to allow compilation with the new headers:
- Manually modify bionic/libc/kernel/uapi/asm-mips/asm/siginfo.h to
remove the uapi from the include.
- PR_XXX defines are now available for mips, so remove the definition
from linker_mips.cpp.
Bug:
23789423
Change-Id: I6dc8a03b012426d3a937db15cb24d3a50fab5a8c
Elliott Hughes [Fri, 5 Feb 2016 21:51:42 +0000 (21:51 +0000)]
Merge "Add a test for snprintf on a PTHREAD_STACK_MIN-sized stack." am:
865f6bce75
am:
ab872d2beb
* commit '
ab872d2bebbc330236927835ad5fa1fa51bf536c':
Add a test for snprintf on a PTHREAD_STACK_MIN-sized stack.
Elliott Hughes [Fri, 5 Feb 2016 20:52:34 +0000 (20:52 +0000)]
Merge "Add a test for snprintf on a PTHREAD_STACK_MIN-sized stack."
am:
865f6bce75
* commit '
865f6bce758ae82b19c0eed2b6fd708945ec841f':
Add a test for snprintf on a PTHREAD_STACK_MIN-sized stack.
Elliott Hughes [Fri, 5 Feb 2016 20:48:01 +0000 (20:48 +0000)]
Merge "Add a test for snprintf on a PTHREAD_STACK_MIN-sized stack."
Elliott Hughes [Fri, 5 Feb 2016 19:18:41 +0000 (11:18 -0800)]
Add a test for snprintf on a PTHREAD_STACK_MIN-sized stack.
This is a common thing for people to want to do, snprintf requires
a lot of stack for itself, and PTHREAD_STACK_MIN should be usable
for realistic code.
Change-Id: Ib09cfb4e0beec1c69ee0944c3ea4c5d03a94c491
Dimitry Ivanov [Fri, 5 Feb 2016 17:26:02 +0000 (17:26 +0000)]
Merge "Add check for pthread_self() when looking up a thread" am:
b90837c3d3
am:
7e694a20fd
* commit '
7e694a20fd4136f8aca9afa294dae663a49efacc':
Add check for pthread_self() when looking up a thread
Dimitry Ivanov [Fri, 5 Feb 2016 04:33:48 +0000 (04:33 +0000)]
Merge "Add check for pthread_self() when looking up a thread"
am:
b90837c3d3
* commit '
b90837c3d316c6ea8d6f0b0b6a3643d0d3245a0e':
Add check for pthread_self() when looking up a thread
Dimitry Ivanov [Fri, 5 Feb 2016 04:29:54 +0000 (04:29 +0000)]
Merge "Add check for pthread_self() when looking up a thread"
Dimitry Ivanov [Fri, 5 Feb 2016 00:21:01 +0000 (16:21 -0800)]
Add check for pthread_self() when looking up a thread
Check if thread_id is in fact pthread_self before
locking on g_thread_list_lock in __pthread_internal_find.
The main reason for doing this is not performance but to allow
the linker use raise() which was not working because pthread_kill()
couldn't find pthread_self() thread because the global thread
list is initialized in libc.so and the linker's version of this
list is empty.
Bug: http://b/
25867917
Change-Id: I18fe620e8cd465b30f0e1ff45fff32958f3c5c00
Dan Willemsen [Thu, 4 Feb 2016 05:48:08 +0000 (21:48 -0800)]
Update Android.bp
Also reorders some arch-specific sources to match the order in the
Android.mk system.
Change-Id: Ibde46a7cef9840b759be796ce9ac6618d3b06532
Elliott Hughes [Wed, 3 Feb 2016 23:20:30 +0000 (23:20 +0000)]
Merge "Add in6addr_any and in6addr_loopback symbols." am:
d2be380258
am:
316eb69ad4
* commit '
316eb69ad4c5e89c3a0f057e79d7e9342609a010':
Add in6addr_any and in6addr_loopback symbols.
Elliott Hughes [Wed, 3 Feb 2016 23:18:16 +0000 (23:18 +0000)]
Merge "Add in6addr_any and in6addr_loopback symbols."
am:
d2be380258
* commit '
d2be3802582e69bfaf1a8ab02849bc44c4fa2ce6':
Add in6addr_any and in6addr_loopback symbols.
Elliott Hughes [Wed, 3 Feb 2016 23:12:10 +0000 (23:12 +0000)]
Merge "Add in6addr_any and in6addr_loopback symbols."
Elliott Hughes [Wed, 3 Feb 2016 22:13:52 +0000 (14:13 -0800)]
Add in6addr_any and in6addr_loopback symbols.
Change-Id: I3a90fa448b6bd43321672ba74b84a4e9e8a67738
Elliott Hughes [Wed, 3 Feb 2016 22:09:20 +0000 (22:09 +0000)]
Merge "Really add adjtimex(2), and add clock_adjtime(2) too." am:
5da33dd673
am:
d1cfd67c6b
* commit '
d1cfd67c6b92767c959a4ed9a00126e1c7ecbc19':
Really add adjtimex(2), and add clock_adjtime(2) too.
Elliott Hughes [Wed, 3 Feb 2016 22:07:21 +0000 (22:07 +0000)]
Merge "Really add adjtimex(2), and add clock_adjtime(2) too."
am:
5da33dd673
* commit '
5da33dd67350fcb7c12a57027b1af5f4e72a9c21':
Really add adjtimex(2), and add clock_adjtime(2) too.
Dimitry Ivanov [Wed, 3 Feb 2016 22:04:35 +0000 (22:04 +0000)]
Merge "linker: Change the library search order" am:
c92ffa95fc
am:
10e4fd56b5
* commit '
10e4fd56b5e86ca1a9a6bbcb4b62f6f4592bf508':
linker: Change the library search order
Elliott Hughes [Wed, 3 Feb 2016 22:03:09 +0000 (22:03 +0000)]
Merge "Really add adjtimex(2), and add clock_adjtime(2) too."
Dimitry Ivanov [Wed, 3 Feb 2016 22:02:17 +0000 (22:02 +0000)]
Merge "linker: Change the library search order"
am:
c92ffa95fc
* commit '
c92ffa95fc2f9ef4d381033d313797cffe14709e':
linker: Change the library search order
Dimitry Ivanov [Wed, 3 Feb 2016 21:58:40 +0000 (21:58 +0000)]
Merge "linker: Change the library search order"
Elliott Hughes [Wed, 3 Feb 2016 21:19:10 +0000 (13:19 -0800)]
Really add adjtimex(2), and add clock_adjtime(2) too.
Change-Id: I81fde2ec9fdf787bb19a784ad13df92d33a4f852
Elliott Hughes [Wed, 3 Feb 2016 20:58:25 +0000 (20:58 +0000)]
Merge "Add fopen64/freopen64/tmpfile64 aliases." am:
36ff699570
am:
e8e8873d9f
* commit '
e8e8873d9f1d277ede6c9156f5bd78ef9eee3f1e':
Add fopen64/freopen64/tmpfile64 aliases.