OSDN Git Service

android-x86/bionic.git
8 years agoAdjust test to let it pass on libhoudini.
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.

Change-Id: Id9457f47fc338a3103fdee25a7a6e622915e7090

8 years agoMerge "Minor clock_getcpuclockid optimization."
Elliott Hughes [Mon, 7 Mar 2016 21:08:53 +0000 (21:08 +0000)]
Merge "Minor clock_getcpuclockid optimization."

8 years agoMinor clock_getcpuclockid optimization.
Elliott Hughes [Mon, 7 Mar 2016 19:54:02 +0000 (11:54 -0800)]
Minor clock_getcpuclockid optimization.

Don't ask the kernel to copy data to userspace if we don't need it.
(Noticed while cleaning up sysconf to not call clock_getres.)

Change-Id: Icc0f7559775b8a2dcefe638ce831d06b75d67122

8 years agoMerge "forkpty: set the output fd to -1 on the slave side."
Josh Gao [Sat, 5 Mar 2016 03:04:36 +0000 (03:04 +0000)]
Merge "forkpty: set the output fd to -1 on the slave side."

8 years agoMerge "Don't call clock_getres in sysconf."
Elliott Hughes [Sat, 5 Mar 2016 02:31:08 +0000 (02:31 +0000)]
Merge "Don't call clock_getres in sysconf."

8 years agoDon't call clock_getres in sysconf.
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
Change-Id: I2eb6986d871bc03cbef278e5617734409c39e057

8 years agoforkpty: set the output fd to -1 on the slave side.
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

8 years agoMerge "Add __memset_chk assembler for mips32 and mips64."
Elliott Hughes [Sat, 5 Mar 2016 01:07:10 +0000 (01:07 +0000)]
Merge "Add __memset_chk assembler for mips32 and mips64."

8 years agoAdd __memset_chk assembler for mips32 and mips64.
Douglas Leung [Fri, 4 Mar 2016 02:55:39 +0000 (18:55 -0800)]
Add __memset_chk assembler for mips32 and mips64.

Change-Id: I365b1f345c695850c30ccb1a9f56f254ce182000

8 years agoMerge "libm: rename LIBC_PRIVATE to LIBC_DEPRECATED"
Dimitry Ivanov [Fri, 4 Mar 2016 21:29:48 +0000 (21:29 +0000)]
Merge "libm: rename LIBC_PRIVATE to LIBC_DEPRECATED"

8 years agoMerge "Enable test with clang aarch64."
Chih-hung Hsieh [Fri, 4 Mar 2016 21:26:05 +0000 (21:26 +0000)]
Merge "Enable test with clang aarch64."

8 years agoEnable test with clang aarch64.
Chih-Hung Hsieh [Fri, 4 Mar 2016 20:28:50 +0000 (12:28 -0800)]
Enable test with clang aarch64.

TLS bug on aarch64 was fixed.

Bug: 25642296
Change-Id: I02b4f67955991f08a133a3d72ba4b109f896f1dd

8 years agolibm: rename LIBC_PRIVATE to LIBC_DEPRECATED
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

8 years agoMerge "Add x86 __memset_chk assembler."
Elliott Hughes [Fri, 4 Mar 2016 16:28:10 +0000 (16:28 +0000)]
Merge "Add x86 __memset_chk assembler."

8 years agoMerge "Fix x86-64 __memset_chk."
Elliott Hughes [Fri, 4 Mar 2016 03:12:35 +0000 (03:12 +0000)]
Merge "Fix x86-64 __memset_chk."

8 years agoFix x86-64 __memset_chk.
Elliott Hughes [Fri, 4 Mar 2016 00:46:25 +0000 (16:46 -0800)]
Fix x86-64 __memset_chk.

I can only assume I was testing the 32-bit implementation when I claimed
this worked. While improving the 32-bit code I realized that I'd used
signed comparisons instead of unsigned, and came back to find that the
64-bit code didn't work.

By way of apology, make x86-64 the first architecture where __memset_chk
falls through to memset.

Change-Id: I54d9eee5349b6a2abb2ce81e161fdcde09556561

8 years agoAdd x86 __memset_chk assembler.
Elliott Hughes [Fri, 4 Mar 2016 00:10:33 +0000 (16:10 -0800)]
Add x86 __memset_chk assembler.

Change-Id: Ic6732f761ea8a41f70d5ff59d47ad38417d17cc2

8 years agoMerge "Update Android.bp with recent *.mk changes"
Dan Willemsen [Thu, 3 Mar 2016 23:50:24 +0000 (23:50 +0000)]
Merge "Update Android.bp with recent *.mk changes"

8 years agoUpdate Android.bp with recent *.mk changes
Dan Willemsen [Thu, 3 Mar 2016 23:40:33 +0000 (15:40 -0800)]
Update Android.bp with recent *.mk changes

Change-Id: I01acce3b0018d838c4765881c19f5f009721370f

8 years agoMerge "Clean up bcopy cruft."
Elliott Hughes [Thu, 3 Mar 2016 22:24:51 +0000 (22:24 +0000)]
Merge "Clean up bcopy cruft."

8 years agoMerge "Mandate optimized assembler for x86-64 __memset_chk."
Elliott Hughes [Thu, 3 Mar 2016 22:18:45 +0000 (22:18 +0000)]
Merge "Mandate optimized assembler for x86-64 __memset_chk."

8 years agoMerge changes I17c22dc2,I9989e2ea
Josh Gao [Thu, 3 Mar 2016 22:02:37 +0000 (22:02 +0000)]
Merge changes I17c22dc2,I9989e2ea

* changes:
  Add a checksum to jmp_buf on AArch64.
  Add a checksum to jmp_buf on ARM.

8 years agoAdd a checksum to jmp_buf on AArch64.
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

8 years agoAdd a checksum to jmp_buf on ARM.
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

8 years agoClean up bcopy cruft.
Elliott Hughes [Thu, 3 Mar 2016 18:41:42 +0000 (10:41 -0800)]
Clean up bcopy cruft.

Also remove some generic x86 assembler that's never built.

Change-Id: Ic126de2eee646b5ba2b6ee549679ba90d67a48bb

8 years agoMerge "Remove optimized code for bzero, which was removed from POSIX in 2008."
Elliott Hughes [Thu, 3 Mar 2016 18:26:02 +0000 (18:26 +0000)]
Merge "Remove optimized code for bzero, which was removed from POSIX in 2008."

8 years agoRemove optimized code for bzero, which was removed from POSIX in 2008.
Elliott Hughes [Thu, 3 Mar 2016 01:18:18 +0000 (17:18 -0800)]
Remove optimized code for bzero, which was removed from POSIX in 2008.

I'll come back for the last bcopy remnant...

Bug: http://b/26407170
Change-Id: Iabfeb95fc8a4b4b3992e3cc209ec5221040e7c26

8 years agoMandate optimized assembler for x86-64 __memset_chk.
Elliott Hughes [Thu, 3 Mar 2016 00:39:29 +0000 (16:39 -0800)]
Mandate optimized assembler for x86-64 __memset_chk.

Change-Id: I4d6b452f3cf850d405e8f5d7da01d432603e606b

8 years agoMerge "Mandate optimized __memset_chk for arm and arm64."
Elliott Hughes [Thu, 3 Mar 2016 00:30:06 +0000 (00:30 +0000)]
Merge "Mandate optimized __memset_chk for arm and arm64."

8 years agoMerge "libdl: Rename LIBC_PRIVATE to LIBC_PLATFORM"
Dimitry Ivanov [Wed, 2 Mar 2016 21:04:31 +0000 (21:04 +0000)]
Merge "libdl: Rename LIBC_PRIVATE to LIBC_PLATFORM"

8 years agoMandate optimized __memset_chk for arm and arm64.
Elliott Hughes [Wed, 2 Mar 2016 19:58:41 +0000 (11:58 -0800)]
Mandate optimized __memset_chk for arm and arm64.

This involves actually implementing assembler __memset_chk for arm64,
but that's easily done.

Obviously I'd like this for all architectures (and all the string functions),
but this is low-hanging fruit...

Change-Id: I70ec48c91aafd1f0feb974a2555c51611de9ef82

8 years agoMerge "Do not add linker the _r_debug.r_map on link_image"
Dimitry Ivanov [Wed, 2 Mar 2016 19:49:25 +0000 (19:49 +0000)]
Merge "Do not add linker the _r_debug.r_map on link_image"

8 years agolibdl: Rename LIBC_PRIVATE to LIBC_PLATFORM
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

8 years agoMerge "Improve diagnostics from the assembler __memcpy_chk routines."
Elliott Hughes [Wed, 2 Mar 2016 19:13:02 +0000 (19:13 +0000)]
Merge "Improve diagnostics from the assembler __memcpy_chk routines."

8 years agoDo not add linker the _r_debug.r_map on link_image
Dimitry Ivanov [Tue, 1 Mar 2016 23:55:56 +0000 (15:55 -0800)]
Do not add linker the _r_debug.r_map on link_image

Change-Id: Idd0fb06a5d9f400c0608ae532cc4c575211810fa

8 years agoMerge "Fix getifaddrs' handling of point-to-point interfaces."
Elliott Hughes [Wed, 2 Mar 2016 16:06:13 +0000 (16:06 +0000)]
Merge "Fix getifaddrs' handling of point-to-point interfaces."

8 years agoFix getifaddrs' handling of point-to-point interfaces.
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
Change-Id: I4c5823b32204ae6c15527853414c2a0cef320b53

8 years agoMerge "linker: print "not accessible" error message to the log"
Dimitry Ivanov [Tue, 1 Mar 2016 23:29:59 +0000 (23:29 +0000)]
Merge "linker: print "not accessible" error message to the log"

8 years agolinker: print "not accessible" error message to the log
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
(cherry picked from commit 350bdad61cc6551db649fcaeb8642f4a1d6b139a)

8 years agoImprove diagnostics from the assembler __memcpy_chk routines.
Elliott Hughes [Tue, 1 Mar 2016 22:45:58 +0000 (14:45 -0800)]
Improve diagnostics from the assembler __memcpy_chk routines.

Change-Id: Iec16c92ed80beee505cba2121ea33e3550197b02

8 years agoMerge "Improve diagnostics from the assembler __memset_chk routines."
Elliott Hughes [Tue, 1 Mar 2016 21:25:06 +0000 (21:25 +0000)]
Merge "Improve diagnostics from the assembler __memset_chk routines."

8 years agoImprove diagnostics from the assembler __memset_chk routines.
Elliott Hughes [Tue, 1 Mar 2016 19:22:42 +0000 (11:22 -0800)]
Improve diagnostics from the assembler __memset_chk routines.

Change-Id: Ic165043ab8cd5e16866b3e11cfba960514cbdc57

8 years agoMerge "Update libgcc_compat.c file for mips32 arch"
Dimitry Ivanov [Tue, 1 Mar 2016 19:35:35 +0000 (19:35 +0000)]
Merge "Update libgcc_compat.c file for mips32 arch"

8 years agoUpdate libgcc_compat.c file for mips32 arch
Lazar Trsic [Tue, 1 Mar 2016 14:14:58 +0000 (15:14 +0100)]
Update libgcc_compat.c file for mips32 arch

Contains complete list of libgcc references.

Change-Id: If6b8000dcefa72036a025ebbe59f51e93fe57e98

8 years agoMerge "Copy the entire zero-separated DNS seach domain string."
Pierre Imai [Tue, 1 Mar 2016 08:15:03 +0000 (08:15 +0000)]
Merge "Copy the entire zero-separated DNS seach domain string."

8 years agoMerge "Rewrite ifaddrs#getifaddrs_INET."
Elliott Hughes [Tue, 1 Mar 2016 03:21:35 +0000 (03:21 +0000)]
Merge "Rewrite ifaddrs#getifaddrs_INET."

8 years agoRewrite ifaddrs#getifaddrs_INET.
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
Change-Id: I9cabd17e414ce42b115037a3f828d79843f604f9

8 years agoMerge "Move hard-coded values to constants."
Christopher Ferris [Mon, 29 Feb 2016 19:22:59 +0000 (19:22 +0000)]
Merge "Move hard-coded values to constants."

8 years agoMerge "Update Android.bp with recent Android.mk changes"
Dan Willemsen [Mon, 29 Feb 2016 19:06:47 +0000 (19:06 +0000)]
Merge "Update Android.bp with recent Android.mk changes"

8 years agoUpdate Android.bp with recent Android.mk changes
Dan Willemsen [Mon, 29 Feb 2016 18:37:56 +0000 (10:37 -0800)]
Update Android.bp with recent Android.mk changes

Change-Id: If9777e9ece6de1bc00c3ef86724c7bd4d437aaca

8 years agoCopy the entire zero-separated DNS seach domain string.
Pierre Imai [Mon, 29 Feb 2016 07:31:55 +0000 (16:31 +0900)]
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

8 years agoMerge "Create logging sockets with SOCK_NONBLOCK..."
Elliott Hughes [Sun, 28 Feb 2016 15:54:44 +0000 (15:54 +0000)]
Merge "Create logging sockets with SOCK_NONBLOCK..."

8 years agoCreate logging sockets with SOCK_NONBLOCK...
Elliott Hughes [Sun, 28 Feb 2016 03:18:41 +0000 (19:18 -0800)]
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

8 years agoMerge "Improve FORTIFY failure diagnostics."
Elliott Hughes [Sun, 28 Feb 2016 00:30:31 +0000 (00:30 +0000)]
Merge "Improve FORTIFY failure diagnostics."

8 years agoImprove FORTIFY failure diagnostics.
Elliott Hughes [Fri, 26 Feb 2016 04:33:47 +0000 (20:33 -0800)]
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

8 years agoMove hard-coded values to constants.
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
Change-Id: I597a6d71279a2df9cc7e98c42ac70224261bac99

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: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: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()."
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: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: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: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 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:43:47 +0000 (02:43 +0000)]
Merge "Improvements to dynamic linker messages"

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: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: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: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: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: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: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: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:38:02 +0000 (20:38 +0000)]
Merge "malloc_debug: reset TrackData mutex after fork"

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"