OSDN Git Service

android-x86/bionic.git
8 years agoMerge "Update timezone data to 2016a"
Neil Fuller [Fri, 26 Feb 2016 11:25:05 +0000 (11:25 +0000)]
Merge "Update timezone data to 2016a"
am: eb727252f2

* commit 'eb727252f22bd533ebfd40637c0718fdc9946221':
  Update timezone data to 2016a

8 years agoMerge "Update timezone data to 2016a"
Neil Fuller [Fri, 26 Feb 2016 11:23:28 +0000 (11:23 +0000)]
Merge "Update timezone data to 2016a"

8 years agoMerge "If you\'re going to use memset..."
Elliott Hughes [Fri, 26 Feb 2016 06:07:46 +0000 (06:07 +0000)]
Merge "If you\'re going to use memset..."
am: a8f05fcc64

* commit 'a8f05fcc64c6484051112882a087fba533f14322':
  If you're going to use memset...

8 years agoMerge "If you're going to use memset..."
Elliott Hughes [Fri, 26 Feb 2016 06:06:11 +0000 (06:06 +0000)]
Merge "If you're going to use memset..."

8 years agoIf you're going to use memset...
Elliott Hughes [Fri, 26 Feb 2016 06:05:28 +0000 (22:05 -0800)]
If you're going to use memset...

...you'd better #include <string.h>.

Change-Id: I83e0877f4151fc764588e2d876e66d7712d41f61

8 years agoMerge "GCC doesn\'t like {}, and clang doesn\'t like {0}..."
Elliott Hughes [Fri, 26 Feb 2016 05:55:34 +0000 (05:55 +0000)]
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}...

8 years agoMerge "GCC doesn't like {}, and clang doesn't like {0}..."
Elliott Hughes [Fri, 26 Feb 2016 05:53:59 +0000 (05:53 +0000)]
Merge "GCC doesn't like {}, and clang doesn't like {0}..."

8 years agoGCC doesn't like {}, and clang doesn't like {0}...
Elliott Hughes [Fri, 26 Feb 2016 05:51:50 +0000 (21:51 -0800)]
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

8 years agoMerge "Fix a structure initialisation in pthread_exit()."
Anton Kirilov [Fri, 26 Feb 2016 05:02:16 +0000 (05:02 +0000)]
Merge "Fix a structure initialisation in pthread_exit()."
am: d07d77e399

* commit 'd07d77e399ee26291125bedbe46d03e037e705f2':
  Fix a structure initialisation in pthread_exit().

8 years agoMerge "Fix a structure initialisation in pthread_exit()."
Elliott Hughes [Fri, 26 Feb 2016 04:59:51 +0000 (04:59 +0000)]
Merge "Fix a structure initialisation in pthread_exit()."

8 years agoFix a structure initialisation in pthread_exit().
Anton Kirilov [Fri, 19 Feb 2016 18:19:08 +0000 (18:19 +0000)]
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

8 years agoMerge "[MIPS] Add __popcountsi2 to libgcc_compat.c"
Dimitry Ivanov [Thu, 25 Feb 2016 23:17:58 +0000 (23:17 +0000)]
Merge "[MIPS] Add __popcountsi2 to libgcc_compat.c"
am: b4b98e750f

* commit 'b4b98e750f81322f1065194e1618c5a965224f95':
  [MIPS] Add __popcountsi2 to libgcc_compat.c

8 years agoMerge "[MIPS] Add __popcountsi2 to libgcc_compat.c"
Dimitry Ivanov [Thu, 25 Feb 2016 23:12:29 +0000 (23:12 +0000)]
Merge "[MIPS] Add __popcountsi2 to libgcc_compat.c"

8 years ago[MIPS] Add __popcountsi2 to libgcc_compat.c
Dimitry Ivanov [Thu, 25 Feb 2016 22:22:32 +0000 (14:22 -0800)]
[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

8 years agoUpdate 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
(cherry-picked from commit 5408d8f39aeaac1f477757f90b09cff32c641d56)

Change-Id: I568ae45e0b38382507db3c244392ccc2edff29d3

8 years agoMerge "Remove unused libm_clang variable."
Stephen Hines [Tue, 23 Feb 2016 22:13:24 +0000 (22:13 +0000)]
Merge "Remove unused libm_clang variable."
am: e0959b4b16

* commit 'e0959b4b164a26eb9931ed6925c71d7870c063fe':
  Remove unused libm_clang variable.

8 years agoMerge "Remove unused libm_clang variable."
Stephen Hines [Tue, 23 Feb 2016 22:05:25 +0000 (22:05 +0000)]
Merge "Remove unused libm_clang variable."

8 years agoMerge "Fix wrong guard values for 64 bit."
Christopher Ferris [Tue, 23 Feb 2016 19:25:18 +0000 (19:25 +0000)]
Merge "Fix wrong guard values for 64 bit."
am: 0a84f1a5eb

* commit '0a84f1a5eb1be4a742ec5ce8f0376c692d49bec2':
  Fix wrong guard values for 64 bit.

8 years agoMerge "Fix wrong guard values for 64 bit."
Christopher Ferris [Tue, 23 Feb 2016 19:15:57 +0000 (19:15 +0000)]
Merge "Fix wrong guard values for 64 bit."

8 years agoFix wrong guard values for 64 bit.
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
Change-Id: Ice9932d1419e59c07483c4c9fcdb84970844f0a6

8 years agoMerge "Fix incorrect size of array."
Christopher Ferris [Mon, 22 Feb 2016 19:26:10 +0000 (19:26 +0000)]
Merge "Fix incorrect size of array."
am: f2d516b3f9

* commit 'f2d516b3f9ef901991387ee473140ea24feaab48':
  Fix incorrect size of array.

8 years agoMerge "Fix incorrect size of array."
Christopher Ferris [Mon, 22 Feb 2016 18:46:35 +0000 (18:46 +0000)]
Merge "Fix incorrect size of array."

8 years agoFix incorrect size of array.
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
Change-Id: I0140a6100ca370666ae61689087ba41b4914789d

8 years agoRemove unused libm_clang variable.
Stephen Hines [Fri, 19 Feb 2016 09:17:18 +0000 (01:17 -0800)]
Remove unused libm_clang variable.

Bug: http://b/21899249

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

Change-Id: I0e0f2640e2e975f3e154f68509aa791fd22053a9

8 years agoMerge "Improvements to dynamic linker messages"
Dimitry Ivanov [Fri, 19 Feb 2016 02:49:23 +0000 (02:49 +0000)]
Merge "Improvements to dynamic linker messages"
am: b539baab39

* commit 'b539baab398ce20f9add5d6dfbadfdc7abdeb970':
  Improvements to dynamic linker messages

8 years agoMerge "Improvements to dynamic linker messages"
Dimitry Ivanov [Fri, 19 Feb 2016 02:43:47 +0000 (02:43 +0000)]
Merge "Improvements to dynamic linker messages"

8 years agoMerge changes Iac8109b3,I5ad67001,Ic1adb4df,I08a50349
Colin Cross [Fri, 19 Feb 2016 02:34:34 +0000 (02:34 +0000)]
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

8 years agoImprovements to dynamic linker messages
Dimitry Ivanov [Thu, 18 Feb 2016 22:37:44 +0000 (14:37 -0800)]
Improvements to dynamic linker messages

Error messages now include executable name,
also linker doesn't abort if called on itself.

Change-Id: Ia17dd540919544b28062ed71751a1d79ee865206

8 years agoMerge changes Iac8109b3,I5ad67001,Ic1adb4df,I08a50349
Colin Cross [Fri, 19 Feb 2016 01:55:09 +0000 (01:55 +0000)]
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

8 years agomalloc_debug: reread /proc/pid/maps when entry is missing
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.

Change-Id: Iac8109b3e6a07bf02c38300b21eecabf4bcd54df

8 years agoAdd backtrace_string and export to libmemunreachable
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.

Change-Id: I5ad67001c0b4d184903c762863a8588181d4873b

8 years agoExport malloc_backtrace
Colin Cross [Tue, 2 Feb 2016 19:57:54 +0000 (11:57 -0800)]
Export malloc_backtrace

Change-Id: Ic1adb4dfd86b9ca698443a36263a3df2c91edda3

8 years agoExport malloc_iterate and friends
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.

Change-Id: I08a50349af82a95d096b6b4cbac37ababe4b9b06

8 years agoMerge "Move gdb support functions to a separate file"
Dimitry Ivanov [Thu, 18 Feb 2016 22:13:43 +0000 (22:13 +0000)]
Merge "Move gdb support functions to a separate file"
am: aca201358b

* commit 'aca201358b910e5a4b925c639902387fbdfd9016':
  Move gdb support functions to a separate file

8 years agoMerge "Move gdb support functions to a separate file"
Dimitry Ivanov [Thu, 18 Feb 2016 22:12:26 +0000 (22:12 +0000)]
Merge "Move gdb support functions to a separate file"

8 years agoMove gdb support functions to a separate file
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

Change-Id: I96c6592a7055715b18f1137367470fe80987263f

8 years agoMerge "Fix cfi directives for memmove/strlcpy."
Christopher Ferris [Thu, 18 Feb 2016 18:53:20 +0000 (18:53 +0000)]
Merge "Fix cfi directives for memmove/strlcpy."
am: 4327ae07b9

* commit '4327ae07b98d24128adbdfd93e9ed15cfce7e2ed':
  Fix cfi directives for memmove/strlcpy.

8 years agoMerge "Fix cfi directives for memmove/strlcpy."
Christopher Ferris [Thu, 18 Feb 2016 18:46:28 +0000 (18:46 +0000)]
Merge "Fix cfi directives for memmove/strlcpy."

8 years agoMerge "Fix scope ids for link-local IPv6 addresses from getifaddrs(3)."
Elliott Hughes [Thu, 18 Feb 2016 18:40:07 +0000 (18:40 +0000)]
Merge "Fix scope ids for link-local IPv6 addresses from getifaddrs(3)."
am: 90ea63a862

* commit '90ea63a862e2a23c9a72d4fa18ea15c830b25fc8':
  Fix scope ids for link-local IPv6 addresses from getifaddrs(3).

8 years agoMerge "Fix scope ids for link-local IPv6 addresses from getifaddrs(3)."
Elliott Hughes [Thu, 18 Feb 2016 18:35:00 +0000 (18:35 +0000)]
Merge "Fix scope ids for link-local IPv6 addresses from getifaddrs(3)."

8 years agoMerge "Revert "Move gdb support functions to a separate file""
Nicolas Geoffray [Thu, 18 Feb 2016 09:38:22 +0000 (09:38 +0000)]
Merge "Revert "Move gdb support functions to a separate file""
am: be7a1eaf3a

* commit 'be7a1eaf3a871477a7e845e7acb8ed11a91a9d82':
  Revert "Move gdb support functions to a separate file"

8 years agoMerge "Revert "Move gdb support functions to a separate file""
Nicolas Geoffray [Thu, 18 Feb 2016 09:31:41 +0000 (09:31 +0000)]
Merge "Revert "Move gdb support functions to a separate file""

8 years agoRevert "Move gdb support functions to a separate file"
Nicolas Geoffray [Thu, 18 Feb 2016 09:31:24 +0000 (09:31 +0000)]
Revert "Move gdb support functions to a separate file"

Was reverted on internal master already.

This reverts commit f8d051c81b7c22575ac940dea612fb3b880e6d7a.

Change-Id: Ia432f83bcce91366fb23f1bb87603a093b7f074d

8 years agoFix cfi directives for memmove/strlcpy.
Christopher Ferris [Thu, 18 Feb 2016 03:17:02 +0000 (19:17 -0800)]
Fix cfi directives for memmove/strlcpy.

Bug: 27227225
Change-Id: I47ca82daaadb3ec24cefc3c9aa4df7ed1798aced

8 years agoMerge changes Id6e60861,I0eacb3f0
Dimitry Ivanov [Thu, 18 Feb 2016 01:58:25 +0000 (01:58 +0000)]
Merge changes Id6e60861,I0eacb3f0
am: 4dd56ac9a5

* commit '4dd56ac9a5248c9fdeffe6c0f8029a83bcb43fe4':
  Move gdb support functions to a separate file
  Use insert_link_map_into_debug_map for executable

8 years agoMerge changes Id6e60861,I0eacb3f0
Dimitry Ivanov [Thu, 18 Feb 2016 01:25:49 +0000 (01:25 +0000)]
Merge changes Id6e60861,I0eacb3f0

* changes:
  Move gdb support functions to a separate file
  Use insert_link_map_into_debug_map for executable

8 years agoMerge "Fix cfi directives in small strncmp case."
Christopher Ferris [Thu, 18 Feb 2016 01:22:07 +0000 (01:22 +0000)]
Merge "Fix cfi directives in small strncmp case."
am: e73b27a1d3

* commit 'e73b27a1d3482d41a9b3bbc2945426211218b677':
  Fix cfi directives in small strncmp case.

8 years agoMerge "Fix cfi directives in small strncmp case."
Christopher Ferris [Thu, 18 Feb 2016 01:18:25 +0000 (01:18 +0000)]
Merge "Fix cfi directives in small strncmp case."

8 years agoFix cfi directives in small strncmp case.
Christopher Ferris [Thu, 18 Feb 2016 00:34:02 +0000 (16:34 -0800)]
Fix cfi directives in small strncmp case.

Bug: 27227225
Change-Id: Id4f88fe288109a82822ad1b2291858c1c85b0ca7

8 years agoMove gdb support functions to a separate file
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

Change-Id: Id6e608617016383b68283760361c567e58e574bc

8 years agoUse insert_link_map_into_debug_map for executable
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

Change-Id: I0eacb3f030ea3eb16ed50ad2011d604beece2d03

8 years agoFix scope ids for link-local IPv6 addresses from getifaddrs(3).
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
Change-Id: I7a166ff5553565f7afdab18dd2c703af4d475ab4

8 years agoMerge "Update a comment for init_linker_info_for_gdb"
Dimitry Ivanov [Wed, 17 Feb 2016 22:26:49 +0000 (22:26 +0000)]
Merge "Update a comment for init_linker_info_for_gdb"
am: c347a10760

* commit 'c347a107602f3011b393f2b2407425b5d668e14e':
  Update a comment for init_linker_info_for_gdb

8 years agoMerge "Update a comment for init_linker_info_for_gdb"
Dimitry Ivanov [Wed, 17 Feb 2016 22:20:22 +0000 (22:20 +0000)]
Merge "Update a comment for init_linker_info_for_gdb"

8 years agoUpdate a comment for init_linker_info_for_gdb
Dimitry Ivanov [Wed, 17 Feb 2016 22:13:06 +0000 (14:13 -0800)]
Update a comment for init_linker_info_for_gdb

Change-Id: I8e2895ecfcc6f77a180c3735342afc93be5923d3

8 years agoMerge "malloc_debug: reset TrackData mutex after fork"
Colin Cross [Wed, 17 Feb 2016 20:48:37 +0000 (20:48 +0000)]
Merge "malloc_debug: reset TrackData mutex after fork"
am: 598cb89790

* commit '598cb89790ba93edbb392c567ecda32b39d64ff1':
  malloc_debug: reset TrackData mutex after fork

8 years agoMerge "malloc_debug: reset TrackData mutex after fork"
Colin Cross [Wed, 17 Feb 2016 20:38:02 +0000 (20:38 +0000)]
Merge "malloc_debug: reset TrackData mutex after fork"

8 years agoMerge commit '27991ce344830ebb91eba11ded732b513f32b04b' into HEAD
Bill Yi [Wed, 17 Feb 2016 17:50:14 +0000 (09:50 -0800)]
Merge commit '27991ce344830ebb91eba11ded732b513f32b04b' into HEAD

8 years agoMerge "Initialize linker link_map for gdb directly"
Dimitry Ivanov [Wed, 17 Feb 2016 00:00:30 +0000 (00:00 +0000)]
Merge "Initialize linker link_map for gdb directly"

8 years agoMerge "Revert "Revert "Split out liblinker_malloc static library"""
Dimitry Ivanov [Tue, 16 Feb 2016 23:51:37 +0000 (23:51 +0000)]
Merge "Revert "Revert "Split out liblinker_malloc static library"""

8 years agoRevert "Revert "Split out liblinker_malloc static library""
Dimitry Ivanov [Tue, 16 Feb 2016 18:13:42 +0000 (10:13 -0800)]
Revert "Revert "Split out liblinker_malloc static library""

This reverts commit 3bbeca7a1ae3d31cddd97fb6a0140c4cf7e39f8e.

Change-Id: I5a757fcd52a14442c2eb7ca53f7d1f1923a4efe9

8 years agoInitialize linker link_map for gdb directly
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.

Change-Id: Idf32cee56309aa9c9cf260efbd17a9deae9a756b

8 years agoMerge "linker: remove soinfo::entry"
Dimitry Ivanov [Tue, 16 Feb 2016 21:29:43 +0000 (21:29 +0000)]
Merge "linker: remove soinfo::entry"

8 years agolinker: remove soinfo::entry
Dimitry Ivanov [Tue, 16 Feb 2016 21:25:29 +0000 (13:25 -0800)]
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

8 years agoMerge "Revert "Split out liblinker_malloc static library""
Dimitry Ivanov [Mon, 15 Feb 2016 19:21:29 +0000 (19:21 +0000)]
Merge "Revert "Split out liblinker_malloc static library""

8 years agoRevert "Split out liblinker_malloc static library"
Dimitry Ivanov [Mon, 15 Feb 2016 19:19:35 +0000 (19:19 +0000)]
Revert "Split out liblinker_malloc static library"

This reverts commit a80564318a87c1efe76224b8591c707c54d51d2d.

Change-Id: I63f16739a38f40ad930692176a4297ad1ce89570

8 years agoMerge "Add a memcpy(a, a, n) test."
Christopher Ferris [Sat, 13 Feb 2016 17:46:28 +0000 (17:46 +0000)]
Merge "Add a memcpy(a, a, n) test."

8 years agoAdd a memcpy(a, a, n) test.
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.

Change-Id: Ib575af3c14e705bb62c18fad7d57e1cc0d242899

8 years agoMerge "Fix the default alignment of the allocations."
Christopher Ferris [Sat, 13 Feb 2016 01:37:06 +0000 (01:37 +0000)]
Merge "Fix the default alignment of the allocations."

8 years agoFix the default alignment of the allocations.
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
Change-Id: I9af53279617408676b94e4ec6481b3ed7ffafc6a

8 years agoMerge "Fix regerror(..., nullptr, 0)."
Elliott Hughes [Sat, 13 Feb 2016 00:59:42 +0000 (00:59 +0000)]
Merge "Fix regerror(..., nullptr, 0)."

8 years agomalloc_debug: reset TrackData mutex after fork
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.

Change-Id: I0dfed30045a28551217ceac227d33b2e18894932

8 years agoFix regerror(..., nullptr, 0).
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).

Change-Id: I475db71c25706bbf02091b754acabe8254062f3a

8 years agoMerge "Split out liblinker_malloc static library"
Dimitry Ivanov [Thu, 11 Feb 2016 23:29:06 +0000 (23:29 +0000)]
Merge "Split out liblinker_malloc static library"

8 years agoSplit out liblinker_malloc static library
Dimitry Ivanov [Thu, 11 Feb 2016 21:48:49 +0000 (13:48 -0800)]
Split out liblinker_malloc static library

Bug: http://b/14998480
Bug: http://b/25716705
Change-Id: I8c7ba3971d1b17dbfc1a2ab5553aa04fe5da6677

8 years agoMerge "Add tests for zero-sized allocations."
Elliott Hughes [Thu, 11 Feb 2016 17:53:04 +0000 (17:53 +0000)]
Merge "Add tests for zero-sized allocations."

8 years agoAdd tests for zero-sized allocations.
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
Change-Id: I320a8a14884abb806a8d30e3e6cf1ede28b49335

8 years agoMerge "Set x86 TLS limit to 0xfffff, not PAGE_SIZE."
Elliott Hughes [Wed, 10 Feb 2016 15:48:52 +0000 (15:48 +0000)]
Merge "Set x86 TLS limit to 0xfffff, not PAGE_SIZE."

8 years agoSet x86 TLS limit to 0xfffff, not PAGE_SIZE.
Elliott Hughes [Wed, 10 Feb 2016 06:44:16 +0000 (22:44 -0800)]
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

8 years agoMerge "Enable clang for x86_64 after fp128 fix in clang-2577113."
Chih-hung Hsieh [Tue, 9 Feb 2016 01:27:01 +0000 (01:27 +0000)]
Merge "Enable clang for x86_64 after fp128 fix in clang-2577113."

8 years agoEnable clang for x86_64 after fp128 fix in clang-2577113.
Chih-Hung Hsieh [Tue, 9 Feb 2016 01:07:33 +0000 (17:07 -0800)]
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

8 years agoMerge "Update NOTICE files."
Elliott Hughes [Tue, 9 Feb 2016 01:03:01 +0000 (01:03 +0000)]
Merge "Update NOTICE files."

8 years agoUpdate NOTICE files.
Elliott Hughes [Tue, 9 Feb 2016 01:00:12 +0000 (17:00 -0800)]
Update NOTICE files.

Change-Id: I6c4628534c5842c9835ead1bfff6582c5dce38e3

8 years agoMerge "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."

8 years agoMerge "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"

8 years agodefine 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

8 years agoAdd a test for a possible overflow in *printf.
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

8 years agoMerge "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."

8 years agoMerge "Update Android.bp"
Dan Willemsen [Sat, 6 Feb 2016 00:43:13 +0000 (00:43 +0000)]
Merge "Update Android.bp"

8 years agoUpdated to v4.4.1 kernel headers.
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

8 years agoMerge "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."

8 years agoAdd 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

8 years agoMerge "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"

8 years agoAdd 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

8 years agoUpdate Android.bp
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

8 years agoMerge "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."

8 years agoAdd 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

8 years agoMerge "Really add adjtimex(2), and add clock_adjtime(2) too."
Elliott Hughes [Wed, 3 Feb 2016 22:03:09 +0000 (22:03 +0000)]
Merge "Really add adjtimex(2), and add clock_adjtime(2) too."

8 years agoMerge "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"

8 years agoReally add adjtimex(2), and add clock_adjtime(2) too.
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