Colin Cross
2c75991359
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.
Change-Id: I5ad67001c0b4d184903c762863a8588181d4873b
2016-02-18 16:09:17 -08:00
Colin Cross
2d4721c0c5
Export malloc_backtrace
...
Change-Id: Ic1adb4dfd86b9ca698443a36263a3df2c91edda3
2016-02-18 16:09:16 -08:00
Colin Cross
869691c6f7
Export malloc_iterate and friends
...
Export malloc_iterate, malloc_enable, and malloc_disable to be used by
libmemunreachable.
Change-Id: I08a50349af82a95d096b6b4cbac37ababe4b9b06
2016-02-18 15:05:38 -08:00
Dimitry Ivanov
aca201358b
Merge "Move gdb support functions to a separate file"
2016-02-18 22:12:26 +00:00
Dimitry Ivanov
6b788eeff2
Move gdb support functions to a separate file
...
Move gdb support functions and variables to
linker_gdb_support.h/cpp
Change-Id: I96c6592a7055715b18f1137367470fe80987263f
2016-02-18 12:32:56 -08:00
Christopher Ferris
4327ae07b9
Merge "Fix cfi directives for memmove/strlcpy."
2016-02-18 18:46:28 +00:00
Elliott Hughes
90ea63a862
Merge "Fix scope ids for link-local IPv6 addresses from getifaddrs(3)."
2016-02-18 18:35:00 +00:00
Nicolas Geoffray
be7a1eaf3a
Merge "Revert "Move gdb support functions to a separate file""
2016-02-18 09:31:41 +00:00
Nicolas Geoffray
0fa5410b0f
Revert "Move gdb support functions to a separate file"
...
Was reverted on internal master already.
This reverts commit f8d051c81b
.
Change-Id: Ia432f83bcce91366fb23f1bb87603a093b7f074d
2016-02-18 09:31:24 +00:00
Christopher Ferris
97b6e131fd
Fix cfi directives for memmove/strlcpy.
...
Bug: 27227225
Change-Id: I47ca82daaadb3ec24cefc3c9aa4df7ed1798aced
2016-02-17 19:17:02 -08:00
Dimitry Ivanov
4dd56ac9a5
Merge changes Id6e60861,I0eacb3f0
...
* changes:
Move gdb support functions to a separate file
Use insert_link_map_into_debug_map for executable
2016-02-18 01:25:49 +00:00
Christopher Ferris
e73b27a1d3
Merge "Fix cfi directives in small strncmp case."
2016-02-18 01:18:26 +00:00
Christopher Ferris
de84e51f8c
Fix cfi directives in small strncmp case.
...
Bug: 27227225
Change-Id: Id4f88fe288109a82822ad1b2291858c1c85b0ca7
2016-02-17 16:34:02 -08:00
Dimitry Ivanov
f8d051c81b
Move gdb support functions to a separate file
...
Move gdb support functions and variables to
linker_gdb_support.h/cpp
Change-Id: Id6e608617016383b68283760361c567e58e574bc
2016-02-17 16:09:35 -08:00
Dimitry Ivanov
f3064e4bc7
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
Change-Id: I0eacb3f030ea3eb16ed50ad2011d604beece2d03
2016-02-17 15:25:25 -08:00
Elliott Hughes
7dac8b8aab
Fix scope ids for link-local IPv6 addresses from getifaddrs(3).
...
Bug: http://b/27219454
Change-Id: I7a166ff5553565f7afdab18dd2c703af4d475ab4
2016-02-17 14:38:09 -08:00
Dimitry Ivanov
c347a10760
Merge "Update a comment for init_linker_info_for_gdb"
2016-02-17 22:20:22 +00:00
Dimitry Ivanov
6400129628
Update a comment for init_linker_info_for_gdb
...
Change-Id: I8e2895ecfcc6f77a180c3735342afc93be5923d3
2016-02-17 14:13:06 -08:00
Colin Cross
598cb89790
Merge "malloc_debug: reset TrackData mutex after fork"
2016-02-17 20:38:02 +00:00
Dimitry Ivanov
2de48bc809
Merge "Initialize linker link_map for gdb directly"
2016-02-17 00:00:30 +00:00
Dimitry Ivanov
acedcba331
Merge "Revert "Revert "Split out liblinker_malloc static library"""
2016-02-16 23:51:37 +00:00
Dimitry Ivanov
aa9cb26ead
Revert "Revert "Split out liblinker_malloc static library""
...
This reverts commit 3bbeca7a1a
.
Change-Id: I5a757fcd52a14442c2eb7ca53f7d1f1923a4efe9
2016-02-16 14:43:12 -08:00
Dimitry Ivanov
8d22dd53fe
Initialize linker link_map for gdb directly
...
Remove unnecessary construction of soinfo when
initializing linker link_map for gdb.
Change-Id: Idf32cee56309aa9c9cf260efbd17a9deae9a756b
2016-02-16 14:39:15 -08:00
Dimitry Ivanov
b244d21672
Merge "linker: remove soinfo::entry"
2016-02-16 21:29:43 +00:00
Dimitry Ivanov
e687d067c6
linker: remove soinfo::entry
...
This field is used only once and only for main executable;
no need to carry it around in soinfo structure.
Change-Id: I7f80c64e0939e28966b6fed858891f9ce2a9e26b
2016-02-16 13:25:29 -08:00
Dimitry Ivanov
85665af917
Merge "Revert "Split out liblinker_malloc static library""
2016-02-15 19:21:29 +00:00
Dimitry Ivanov
3bbeca7a1a
Revert "Split out liblinker_malloc static library"
...
This reverts commit a80564318a
.
Change-Id: I63f16739a38f40ad930692176a4297ad1ce89570
2016-02-15 19:19:35 +00:00
Christopher Ferris
60a5f7360e
Merge "Add a memcpy(a, a, n) test."
2016-02-13 17:46:28 +00:00
Christopher Ferris
71766c2577
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.
Change-Id: Ib575af3c14e705bb62c18fad7d57e1cc0d242899
2016-02-12 18:09:55 -08:00
Christopher Ferris
249fefbda0
Merge "Fix the default alignment of the allocations."
2016-02-13 01:37:06 +00:00
Christopher Ferris
72df6708c8
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
Change-Id: I9af53279617408676b94e4ec6481b3ed7ffafc6a
2016-02-12 17:30:30 -08:00
Elliott Hughes
925bf56447
Merge "Fix regerror(..., nullptr, 0)."
2016-02-13 00:59:42 +00:00
Colin Cross
7a28a3cf1f
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.
Change-Id: I0dfed30045a28551217ceac227d33b2e18894932
2016-02-12 16:41:14 -08:00
Elliott Hughes
cac2908b08
Fix regerror(..., nullptr, 0).
...
Found by passing a bad regular expression to the Google benchmark
code (https://github.com/google/benchmark ).
Change-Id: I475db71c25706bbf02091b754acabe8254062f3a
2016-02-12 16:00:53 -08:00
Dimitry Ivanov
9750a77b31
Merge "Split out liblinker_malloc static library"
2016-02-11 23:29:06 +00:00
Dimitry Ivanov
a80564318a
Split out liblinker_malloc static library
...
Bug: http://b/14998480
Bug: http://b/25716705
Change-Id: I8c7ba3971d1b17dbfc1a2ab5553aa04fe5da6677
2016-02-11 13:48:49 -08:00
Elliott Hughes
72bca4b410
Merge "Add tests for zero-sized allocations."
2016-02-11 17:53:04 +00:00
Elliott Hughes
884f76e3aa
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
Change-Id: I320a8a14884abb806a8d30e3e6cf1ede28b49335
2016-02-11 08:45:40 -08:00
Elliott Hughes
8fa00a5836
Merge "Set x86 TLS limit to 0xfffff, not PAGE_SIZE."
2016-02-10 15:48:53 +00:00
Elliott Hughes
01b85d5df3
Set x86 TLS limit to 0xfffff, not PAGE_SIZE.
...
Not least because we set limit_in_pages to 1. PAGE_SIZE pages was never
anyone's intention.
Change-Id: Ide867f44a2fb20d4d5d0cd67ced468e8665a0193
2016-02-09 22:44:16 -08:00
Chih-hung Hsieh
4c3cf4ad4d
Merge "Enable clang for x86_64 after fp128 fix in clang-2577113."
2016-02-09 01:27:01 +00:00
Chih-Hung Hsieh
63fedd76ad
Enable clang for x86_64 after fp128 fix in clang-2577113.
...
Upstream LLVM fix was included in prebuilt clang-2577113.
BUG: 21899249
Change-Id: Ief3f3e28650c0bbf8749a5e5d26f45c39e15ed62
2016-02-08 17:07:33 -08:00
Elliott Hughes
273f2e8ccc
Merge "Update NOTICE files."
2016-02-09 01:03:01 +00:00
Elliott Hughes
b4931cee76
Update NOTICE files.
...
Change-Id: I6c4628534c5842c9835ead1bfff6582c5dce38e3
2016-02-08 17:00:12 -08:00
Elliott Hughes
3dbdb9dbe6
Merge "Add a test for a possible overflow in *printf."
2016-02-07 05:35:34 +00:00
Mike Frysinger
9c212fc436
Merge "define pw_gecos to pw_passwd for LP32 systems"
2016-02-06 19:29:29 +00:00
Mike Frysinger
ca6af7f4a8
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
2016-02-06 09:28:44 -05:00
Elliott Hughes
8200e55d94
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
2016-02-05 21:57:37 -08:00
Christopher Ferris
831c8a5249
Merge "Updated to v4.4.1 kernel headers."
2016-02-06 05:24:53 +00:00
Dan Willemsen
138a11c8a1
Merge "Update Android.bp"
2016-02-06 00:43:13 +00:00