OSDN Git Service
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.
Elliott Hughes [Wed, 3 Feb 2016 20:56:34 +0000 (20:56 +0000)]
Merge "Add fopen64/freopen64/tmpfile64 aliases."
am:
36ff699570
* commit '
36ff6995707112e66dd0dec78be7f8ee9b95d321':
Add fopen64/freopen64/tmpfile64 aliases.
Elliott Hughes [Wed, 3 Feb 2016 20:52:42 +0000 (20:52 +0000)]
Merge "Add fopen64/freopen64/tmpfile64 aliases."
Elliott Hughes [Wed, 3 Feb 2016 19:24:28 +0000 (11:24 -0800)]
Add fopen64/freopen64/tmpfile64 aliases.
Our fopen/freopen/tmpfile are already always O_LARGEFILE, but let's add
the aliases for _LARGEFILE_SOURCE compatibility.
Bug: http://b/
24807045
Change-Id: I5d99b3ef3c9f27ce70f13313f6a92e96c7f21f80
Elliott Hughes [Wed, 3 Feb 2016 19:02:48 +0000 (19:02 +0000)]
Merge "Fix ifaddrs#getifaddrs_INET flakiness." am:
a279324094
am:
02075d2100
* commit '
02075d2100686edd059efe0ac6dc8f3eb7f439bd':
Fix ifaddrs#getifaddrs_INET flakiness.
Elliott Hughes [Wed, 3 Feb 2016 19:00:11 +0000 (19:00 +0000)]
Merge "Fix ifaddrs#getifaddrs_INET flakiness."
am:
a279324094
* commit '
a279324094d748b97201412b2457d2f6e26287dd':
Fix ifaddrs#getifaddrs_INET flakiness.
Elliott Hughes [Wed, 3 Feb 2016 18:55:20 +0000 (18:55 +0000)]
Merge "Fix ifaddrs#getifaddrs_INET flakiness."
Elliott Hughes [Wed, 3 Feb 2016 18:50:53 +0000 (18:50 +0000)]
Merge "Expose ftello64." am:
b3cfafd2bd
am:
e74d1d6507
* commit '
e74d1d6507a28c56941d95889219e1ea24b0ac5c':
Expose ftello64.
Elliott Hughes [Wed, 3 Feb 2016 18:48:07 +0000 (18:48 +0000)]
Merge "Expose ftello64."
am:
b3cfafd2bd
* commit '
b3cfafd2bd3aa307457fe89573d6ac232a5de1c6':
Expose ftello64.
Elliott Hughes [Wed, 3 Feb 2016 18:43:17 +0000 (18:43 +0000)]
Merge "Expose ftello64."
Elliott Hughes [Wed, 3 Feb 2016 15:42:33 +0000 (07:42 -0800)]
Fix ifaddrs#getifaddrs_INET flakiness.
The interface name wasn't being nul-terminated for the ioctl. Also clean up
the code a bit to give more useful diagnostics on failure.
Bug: http://b/
26887941
Change-Id: I30c6bdc1a32733971a27ed1fb7db9d8239b6262b
Elliott Hughes [Wed, 3 Feb 2016 06:39:15 +0000 (22:39 -0800)]
Expose ftello64.
Also add the missing test that would have caught this.
Bug: http://b/
24807045
Change-Id: I756a4d825595b52396b15898e3f717156fd1ba2f
Dan Albert [Wed, 3 Feb 2016 02:35:09 +0000 (02:35 +0000)]
Merge "Fix our fortify tests for global -Werror." am:
3e75110bcb
am:
9fbe4a0482
* commit '
9fbe4a048221b7823104265ba410e130263867a9':
Fix our fortify tests for global -Werror.
Dan Albert [Wed, 3 Feb 2016 02:33:15 +0000 (02:33 +0000)]
Merge "Fix our fortify tests for global -Werror."
am:
3e75110bcb
* commit '
3e75110bcb1d7b941ab0633e7e5c36c604512ded':
Fix our fortify tests for global -Werror.
Dan Albert [Wed, 3 Feb 2016 02:28:42 +0000 (02:28 +0000)]
Merge "Fix our fortify tests for global -Werror."
Josh Gao [Wed, 3 Feb 2016 01:36:44 +0000 (01:36 +0000)]
Merge "use GNU C89 extern inline semantics for __size_mul_overflow()" am:
153e9928b8
am:
8e8f990fc4
* commit '
8e8f990fc4fde79c2d10a5c40341d2ce90eb4e95':
use GNU C89 extern inline semantics for __size_mul_overflow()
Josh Gao [Wed, 3 Feb 2016 01:34:34 +0000 (01:34 +0000)]
Merge "use GNU C89 extern inline semantics for __size_mul_overflow()"
am:
153e9928b8
* commit '
153e9928b8bab5e11d4bf4679bf307b81a88108e':
use GNU C89 extern inline semantics for __size_mul_overflow()
Josh Gao [Wed, 3 Feb 2016 01:28:48 +0000 (01:28 +0000)]
Merge "use GNU C89 extern inline semantics for __size_mul_overflow()"
Xia Yang [Thu, 21 Jan 2016 02:34:59 +0000 (18:34 -0800)]
use GNU C89 extern inline semantics for __size_mul_overflow()
__size_mul_overflow generates warning under following compilation envrionment:
-OX -D_FORTIFY_SOURCE=2 (X=1, 2, 3)
For example:
echo '#include <stdio.h>' | \
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc \
-I bionic/libc/arch-arm/include \
-I bionic/libc/include \
-I bionic/libc/kernel/uapi \
-I bionic/libc/kernel/common \
-I bionic/libc/kernel/uapi/asm-arm \
-I bionic/libm/include \
-I bionic/libm/include/arm \
-I bionic/libc/include \
-Werror \
-O1 \
-D_FORTIFY_SOURCE=2 \
-c \
-x c \
-
bionic/libc/include/stdio.h:360:13: error: '__size_mul_overflow' is
static but used in inline function 'fread' which is not static [-Werror]
if (__size_mul_overflow(size, count, &total)) {
^
C99 - 6.7.4
"An inline definition of a function with external linkage shall not contain
a definition of a modifiable object with static storage duration, and shall
not contain a reference to an identifier with internal linkage."
As standard does not require compiler to determine when it is safe to
reference an internal function in an external inline function, but instead
delegalizes such reference as a whole, gcc throws a warning for such code
under C99 compilation. Warning produced by libc header is inhereted widely
and strips the option of using -Werror to track code sanity.
Replace static inline specifier with gnu89 extern inline. Latter "is used
only for inlining. In no case is the function compiled on its own", which
is slightly different from former semantically, but should produce the same
result here.
Change-Id: I6a3374498e5499d110e54468cf9d0d67d2debbe2
Dan Albert [Wed, 3 Feb 2016 01:13:03 +0000 (17:13 -0800)]
Fix our fortify tests for global -Werror.
If anyone has a better way of doing this it would be welcome...
Bug: http://b/
26936282
Change-Id: I796896866327b4b5b5ee4ec36994fb320993f85d
Christopher Ferris [Tue, 2 Feb 2016 22:15:49 +0000 (22:15 +0000)]
Merge "Remove the unused TrackHeader structure." am:
fe60bae4b7
am:
15c35a02da
* commit '
15c35a02daf0a1f8b2c47ac66fde0fd267c33fc1':
Remove the unused TrackHeader structure.
Christopher Ferris [Tue, 2 Feb 2016 22:13:46 +0000 (22:13 +0000)]
Merge "Remove the unused TrackHeader structure."
am:
fe60bae4b7
* commit '
fe60bae4b71f9b4d50912f06acac601762e55b73':
Remove the unused TrackHeader structure.
Christopher Ferris [Tue, 2 Feb 2016 22:09:30 +0000 (22:09 +0000)]
Merge "Remove the unused TrackHeader structure."
Christopher Ferris [Tue, 2 Feb 2016 21:09:59 +0000 (13:09 -0800)]
Remove the unused TrackHeader structure.
Change-Id: I07ae5de717e1fcfbe5dfe552a531db9f630da622
Christopher Ferris [Tue, 2 Feb 2016 20:50:02 +0000 (20:50 +0000)]
Merge "Add better free tracking." am:
4821db1b3e
am:
e98d704731
* commit '
e98d704731dd685d495025ff7cfd751c6e672668':
Add better free tracking.
Christopher Ferris [Tue, 2 Feb 2016 20:47:41 +0000 (20:47 +0000)]
Merge "Add better free tracking."
am:
4821db1b3e
* commit '
4821db1b3ecc14828d4acf4abed26bb7d8b8cf6a':
Add better free tracking.
Christopher Ferris [Tue, 2 Feb 2016 20:40:36 +0000 (20:40 +0000)]
Merge "Add better free tracking."
Greg Hackmann [Tue, 2 Feb 2016 18:12:11 +0000 (18:12 +0000)]
Merge changes I8ca219fa,Ia92d35b1 am:
5992e5fb6d
am:
33c8164b63
* commit '
33c8164b6321d80550b5ec7fbb5f7b49c4ddd954':
socket.h: update AF_* constants
Add adjtimex
Greg Hackmann [Tue, 2 Feb 2016 18:09:25 +0000 (18:09 +0000)]
Merge changes I8ca219fa,Ia92d35b1
am:
5992e5fb6d
* commit '
5992e5fb6da2722fb4c3850048f71ef077735381':
socket.h: update AF_* constants
Add adjtimex
Greg Hackmann [Tue, 2 Feb 2016 18:03:35 +0000 (18:03 +0000)]
Merge changes I8ca219fa,Ia92d35b1
* changes:
socket.h: update AF_* constants
Add adjtimex
Dimitry Ivanov [Tue, 2 Feb 2016 07:00:55 +0000 (23:00 -0800)]
linker: Change the library search order
Look into "/system/lib" before "/vendor/lib", this way
we can ensure that in case of name conflict /system libraries
take precedence.
Change-Id: Ifacdc9dc7a4e175853f499ed09782b2257f09e5a
Greg Hackmann [Thu, 28 Jan 2016 19:07:26 +0000 (11:07 -0800)]
socket.h: update AF_* constants
Change-Id: I8ca219fa429ca8d8f872ed1db98275cd1a06f00b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Dimitry Ivanov [Mon, 1 Feb 2016 20:32:22 +0000 (12:32 -0800)]
linker: check if needed_by is nullptr
Check if needed_by is nullptr in the grey-list warning
also print the name of the library making call to dlopen()
Bug: http://b/
26749878
Change-Id: I4e16223a3e3d8d1539f855a0b3f199c5529027e0
Christopher Ferris [Fri, 29 Jan 2016 02:35:05 +0000 (18:35 -0800)]
Add better free tracking.
Included in this change:
- Change the tag when a pointer is freed so it's easy to detect if
an already freed pointer is being used.
- Move the free backtrace out of the header. This backtrace is only
used under only some circumstances, so no need to allocate space
in all headers for it.
- Add new option free_track_backtrace_num_frames to specify how many
frames to record when the free occurs. This removes the dependency
on the backtrace option to get backtraces.
Bug:
26739265
Change-Id: I76f5209507dcf46af67ada162a7cb2bf282116f2
Shinichiro Hamaji [Fri, 29 Jan 2016 06:45:37 +0000 (06:45 +0000)]
Merge "Tell kati about generated dependencies around crt" am:
37591462fa
am:
c91cd8a47f
* commit '
c91cd8a47f14a96e37d9a5054720886bdacf0bd5':
Tell kati about generated dependencies around crt
Shinichiro Hamaji [Fri, 29 Jan 2016 06:42:46 +0000 (06:42 +0000)]
Merge "Tell kati about generated dependencies around crt"
am:
37591462fa
* commit '
37591462fa76791c2372d789c3532c7cd0ca7a84':
Tell kati about generated dependencies around crt
Shinichiro Hamaji [Fri, 29 Jan 2016 06:37:46 +0000 (06:37 +0000)]
Merge "Tell kati about generated dependencies around crt"
Dimitry Ivanov [Fri, 29 Jan 2016 03:16:29 +0000 (03:16 +0000)]
Merge "Do not allow System.load() of external libraries"
Christopher Ferris [Fri, 29 Jan 2016 02:37:22 +0000 (02:37 +0000)]
Merge "Add min/max values for config values." am:
50647711eb
am:
bfc044628a
* commit '
bfc044628accf3af2ba696f44b2452ce5c8a17dc':
Add min/max values for config values.
Christopher Ferris [Fri, 29 Jan 2016 02:35:26 +0000 (02:35 +0000)]
Merge "Add min/max values for config values."
am:
50647711eb
* commit '
50647711ebaf2360aca05cc94a2fdf431c1a153e':
Add min/max values for config values.
Christopher Ferris [Fri, 29 Jan 2016 02:31:07 +0000 (02:31 +0000)]
Merge "Add min/max values for config values."
Dimitry Ivanov [Fri, 29 Jan 2016 01:24:20 +0000 (17:24 -0800)]
Do not allow System.load() of external libraries
The greylisting mechanism had a bug that allowed
loading any library using absolute path from java code.
It mistakenly assumed they are needed by greylisted
system library when in fact it is dlopen() call from
libnativeloader.
This patch fixes this problem by checking that the library is in
fact dt_needed and it is not a dlopen call.
Bug: http://b/
26394120
Bug: http://b/
22548808
Change-Id: Ia3d4c19e77b04d09a6c3047d684d0c04bd5c785e
Greg Hackmann [Thu, 28 Jan 2016 01:13:51 +0000 (17:13 -0800)]
Add adjtimex
Change-Id: Ia92d35b1851e73c9f157a749dba1e98f68309a8d
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Shinichiro Hamaji [Thu, 28 Jan 2016 10:39:50 +0000 (19:39 +0900)]
Tell kati about generated dependencies around crt
This was a regression since kati has been introduced. Without
this, touching libc/arch-common/bionic/__dso_handle.h doesn't
let ninja rebuild object files.
Bug:
26839129
Change-Id: Ie9ef4559c0d1ff0910a4d250ea36938b291d15db
Dimitry Ivanov [Thu, 28 Jan 2016 04:22:29 +0000 (04:22 +0000)]
Merge "linker: mark library .bss pages with anon:.bss" am:
0e915b294b
am:
2c1589f568
* commit '
2c1589f568ae56c85a8ae4d3d92e248d659eeee4':
linker: mark library .bss pages with anon:.bss
Dimitry Ivanov [Thu, 28 Jan 2016 03:54:26 +0000 (03:54 +0000)]
Merge "linker: mark library .bss pages with anon:.bss"
am:
0e915b294b
* commit '
0e915b294b2b1f0d20cd1b9a4e1721d59ccbfa7a':
linker: mark library .bss pages with anon:.bss
Dimitry Ivanov [Thu, 28 Jan 2016 03:50:24 +0000 (03:50 +0000)]
Merge "linker: mark library .bss pages with anon:.bss"
Christopher Ferris [Thu, 28 Jan 2016 01:23:36 +0000 (17:23 -0800)]
Add min/max values for config values.
This is to only allow realistic values for some of the options.
Bug:
26739265
Change-Id: I172d5401c27e5d638d80f1c93c678c26c4dae0fc
Dimitry Ivanov [Thu, 28 Jan 2016 02:12:03 +0000 (18:12 -0800)]
linker: mark library .bss pages with anon:.bss
Bug: http://b/
26778774
Change-Id: Ie2cdd841b7238de50ef389a897d79f915229616b