Commit graph

16564 commits

Author SHA1 Message Date
Pierre Imai
b908f71f72 Merge "Copy the entire zero-separated DNS seach domain string."
am: 2de7983470

* commit '2de7983470a04e3037a8993553c3b9533b985952':
  Copy the entire zero-separated DNS seach domain string.
2016-03-01 08:15:39 +00:00
Pierre Imai
2de7983470 Merge "Copy the entire zero-separated DNS seach domain string." 2016-03-01 08:15:03 +00:00
Elliott Hughes
686a2beaee Merge "Rewrite ifaddrs#getifaddrs_INET."
am: 27900405c6

* commit '27900405c66c53e3a45637661f89ff3c8cf69ec5':
  Rewrite ifaddrs#getifaddrs_INET.
2016-03-01 03:22:16 +00:00
Elliott Hughes
27900405c6 Merge "Rewrite ifaddrs#getifaddrs_INET." 2016-03-01 03:21:35 +00:00
Elliott Hughes
bf97770a86 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
Change-Id: I9cabd17e414ce42b115037a3f828d79843f604f9
2016-02-29 17:58:54 -08:00
Christopher Ferris
787e3f6136 Merge "Move hard-coded values to constants."
am: 6fa50a292e

* commit '6fa50a292e541d9be846f03cff52c0ae95781fb2':
  Move hard-coded values to constants.
2016-02-29 19:23:45 +00:00
Christopher Ferris
6fa50a292e Merge "Move hard-coded values to constants." 2016-02-29 19:22:59 +00:00
Dan Willemsen
85884137d9 Merge "Update Android.bp with recent Android.mk changes"
am: bb3add2125

* commit 'bb3add2125ce4ace0ba053e3c9bb2a8bf3840f47':
  Update Android.bp with recent Android.mk changes
2016-02-29 19:10:03 +00:00
Dan Willemsen
bb3add2125 Merge "Update Android.bp with recent Android.mk changes" 2016-02-29 19:06:48 +00:00
Dan Willemsen
879cec2770 Update Android.bp with recent Android.mk changes
Change-Id: If9777e9ece6de1bc00c3ef86724c7bd4d437aaca
2016-02-29 10:37:56 -08:00
Pierre Imai
0967fc7e59 Copy the entire zero-separated DNS seach domain string.
The DNS search string contains zeros as domain separator. The resolver
code erroneously used strlcpy(), which resulted in only the first domain
to be copied. The code uses pointers into this string to access the
individual domains. Since the structure is zero-initialized, this bug only
resulted in zero-length domains instead of accessing unitialized memory.

BUG: 27312811
Change-Id: Ia9d066c405dfcc5e82d6766d93ead2ce574e7b0d
2016-02-29 16:50:38 +09:00
Elliott Hughes
849551dc28 Merge "Create logging sockets with SOCK_NONBLOCK..."
am: 17866357c5

* commit '17866357c5437d1b43b9f4b7411e48d9c9c38bec':
  Create logging sockets with SOCK_NONBLOCK...
2016-02-28 15:55:39 +00:00
Elliott Hughes
17866357c5 Merge "Create logging sockets with SOCK_NONBLOCK..." 2016-02-28 15:54:44 +00:00
Elliott Hughes
0f67d5ffa4 Create logging sockets with SOCK_NONBLOCK...
...rather than calling fcntl on them directly after creation.

Bug: https://code.google.com/p/android/issues/detail?id=201440
Change-Id: Ia3941b7645455d69620b1a361902df009b5da2c5
2016-02-27 19:18:41 -08:00
Elliott Hughes
255ef494f7 Merge "Improve FORTIFY failure diagnostics."
am: 31adf6cd38

* commit '31adf6cd3846030f0d7397fa5f3cc285d8c79533':
  Improve FORTIFY failure diagnostics.
2016-02-28 00:31:16 +00:00
Elliott Hughes
31adf6cd38 Merge "Improve FORTIFY failure diagnostics." 2016-02-28 00:30:31 +00:00
Elliott Hughes
b83d6747fa Improve FORTIFY failure diagnostics.
Our FORTIFY _chk functions' implementations were very repetitive and verbose
but not very helpful. We'd also screwed up and put the SSIZE_MAX checks where
they would never fire unless you actually had a buffer as large as half your
address space, which probably doesn't happen very often.

Factor out the duplication and take the opportunity to actually show details
like how big the overrun buffer was, or by how much it was overrun.

Also remove the obsolete FORTIFY event logging.

Also remove the unused __libc_fatal_no_abort.

This change doesn't improve the diagnostics from the optimized assembler
implementations.

Change-Id: I176a90701395404d50975b547a00bd2c654e1252
2016-02-26 22:06:17 -08:00
Christopher Ferris
549e52200b 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
Change-Id: I597a6d71279a2df9cc7e98c42ac70224261bac99
2016-02-26 17:02:17 -08:00
Neil Fuller
812506301d Merge "Update timezone data to 2016a"
am: eb727252f2

* commit 'eb727252f22bd533ebfd40637c0718fdc9946221':
  Update timezone data to 2016a
2016-02-26 11:25:05 +00:00
Neil Fuller
eb727252f2 Merge "Update timezone data to 2016a" 2016-02-26 11:23:28 +00:00
Elliott Hughes
74e096efc5 Merge "If you\'re going to use memset..."
am: a8f05fcc64

* commit 'a8f05fcc64c6484051112882a087fba533f14322':
  If you're going to use memset...
2016-02-26 06:07:46 +00:00
Elliott Hughes
a8f05fcc64 Merge "If you're going to use memset..." 2016-02-26 06:06:11 +00:00
Elliott Hughes
f86c4494ff If you're going to use memset...
...you'd better #include <string.h>.

Change-Id: I83e0877f4151fc764588e2d876e66d7712d41f61
2016-02-25 22:05:28 -08:00
Elliott Hughes
30fbacba13 Merge "GCC doesn\'t like {}, and clang doesn\'t like {0}..."
am: a8e75ba37d

* commit 'a8e75ba37deff962b0ddbc2fb81b96c3515ae7e5':
  GCC doesn't like {}, and clang doesn't like {0}...
2016-02-26 05:55:34 +00:00
Elliott Hughes
a8e75ba37d Merge "GCC doesn't like {}, and clang doesn't like {0}..." 2016-02-26 05:53:59 +00:00
Elliott Hughes
2c6c95348c GCC doesn't like {}, and clang doesn't like {0}...
...so memset it is, then.

I'll be glad when GCC is dead and we can use "= {}" like it's the 21st century.

Change-Id: I28d820d3926ac9bf44bf7c1e89e184726c840391
2016-02-25 21:51:50 -08:00
Anton Kirilov
2e3f5e72a6 Merge "Fix a structure initialisation in pthread_exit()."
am: d07d77e399

* commit 'd07d77e399ee26291125bedbe46d03e037e705f2':
  Fix a structure initialisation in pthread_exit().
2016-02-26 05:02:16 +00:00
Elliott Hughes
d07d77e399 Merge "Fix a structure initialisation in pthread_exit()." 2016-02-26 04:59:51 +00:00
Anton Kirilov
6bd5cf60fa Fix a structure initialisation in pthread_exit().
The purpose of this change is to silence Valgrind's warning about a
syscall parameter pointing to uninitialised bytes.

Change-Id: I2737235f9ac288dbc8ec4be0c6f1cef181c9b7d7
2016-02-25 20:49:15 -08:00
Dimitry Ivanov
ec7c01930b Merge "[MIPS] Add __popcountsi2 to libgcc_compat.c"
am: b4b98e750f

* commit 'b4b98e750f81322f1065194e1618c5a965224f95':
  [MIPS] Add __popcountsi2 to libgcc_compat.c
2016-02-25 23:17:58 +00:00
Dimitry Ivanov
b4b98e750f Merge "[MIPS] Add __popcountsi2 to libgcc_compat.c" 2016-02-25 23:12:29 +00:00
Dimitry Ivanov
19acb698e8 [MIPS] Add __popcountsi2 to libgcc_compat.c
Also removed outdated genlibgcc_compat.py script
and references to it.

Bug: http://b/27340856
Change-Id: I7eef362364078867c60a27e72abba515f08b6651
2016-02-25 14:28:45 -08:00
Neil Fuller
92057af535 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 5408d8f39a)

Change-Id: I568ae45e0b38382507db3c244392ccc2edff29d3
2016-02-25 17:53:37 +00:00
Stephen Hines
32db9a85ec Merge "Remove unused libm_clang variable."
am: e0959b4b16

* commit 'e0959b4b164a26eb9931ed6925c71d7870c063fe':
  Remove unused libm_clang variable.
2016-02-23 22:13:24 +00:00
Stephen Hines
e0959b4b16 Merge "Remove unused libm_clang variable." 2016-02-23 22:05:25 +00:00
Christopher Ferris
11bd005f7e Merge "Fix wrong guard values for 64 bit."
am: 0a84f1a5eb

* commit '0a84f1a5eb1be4a742ec5ce8f0376c692d49bec2':
  Fix wrong guard values for 64 bit.
2016-02-23 19:25:18 +00:00
Christopher Ferris
0a84f1a5eb Merge "Fix wrong guard values for 64 bit." 2016-02-23 19:15:57 +00:00
Christopher Ferris
0e2a026579 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
Change-Id: Ice9932d1419e59c07483c4c9fcdb84970844f0a6
2016-02-22 19:14:26 -08:00
Christopher Ferris
9e6b62dffe Merge "Fix incorrect size of array."
am: f2d516b3f9

* commit 'f2d516b3f9ef901991387ee473140ea24feaab48':
  Fix incorrect size of array.
2016-02-22 19:26:10 +00:00
Christopher Ferris
f2d516b3f9 Merge "Fix incorrect size of array." 2016-02-22 18:46:35 +00:00
Christopher Ferris
f499dc91e7 Fix incorrect size of array.
When using sscanf and "%4s", the array passed in must include space for
a nul terminator.

Bug: 26739265
Change-Id: I0140a6100ca370666ae61689087ba41b4914789d
2016-02-19 18:13:29 -08:00
Stephen Hines
64955c84c0 Remove unused libm_clang variable.
Bug: http://b/21899249

As part of the cleanup here, this unset/unused variable was missed.

Change-Id: I0e0f2640e2e975f3e154f68509aa791fd22053a9
2016-02-19 01:17:18 -08:00
Dimitry Ivanov
582e162a75 Merge "Improvements to dynamic linker messages"
am: b539baab39

* commit 'b539baab398ce20f9add5d6dfbadfdc7abdeb970':
  Improvements to dynamic linker messages
2016-02-19 02:49:23 +00:00
Dimitry Ivanov
b539baab39 Merge "Improvements to dynamic linker messages" 2016-02-19 02:43:48 +00:00
Colin Cross
74c0a68e3e Merge changes Iac8109b3,I5ad67001,Ic1adb4df,I08a50349
am: c95a4c8196

* commit 'c95a4c8196f470f8fb5e616d8e5cc79672752cbb':
  malloc_debug: reread /proc/pid/maps when entry is missing
  Add backtrace_string and export to libmemunreachable
  Export malloc_backtrace
  Export malloc_iterate and friends
2016-02-19 02:34:34 +00:00
Dimitry Ivanov
9f0a6954c6 Improvements to dynamic linker messages
Error messages now include executable name,
also linker doesn't abort if called on itself.

Change-Id: Ia17dd540919544b28062ed71751a1d79ee865206
2016-02-18 18:28:08 -08:00
Colin Cross
c95a4c8196 Merge changes Iac8109b3,I5ad67001,Ic1adb4df,I08a50349
* changes:
  malloc_debug: reread /proc/pid/maps when entry is missing
  Add backtrace_string and export to libmemunreachable
  Export malloc_backtrace
  Export malloc_iterate and friends
2016-02-19 01:55:10 +00:00
Colin Cross
d75d4bea54 malloc_debug: reread /proc/pid/maps when entry is missing
Reread /proc/pid/maps on demand in case a new library has been loaded.

Change-Id: Iac8109b3e6a07bf02c38300b21eecabf4bcd54df
2016-02-18 16:09:17 -08:00
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