OSDN Git Service

android-x86/bionic.git
9 years agoHide __libc_init_vdso().
Dan Albert [Wed, 13 Aug 2014 20:11:58 +0000 (13:11 -0700)]
Hide __libc_init_vdso().

Bug: 11156955
Change-Id: I7ee31e1ee2ce479c5746b374a239637d582815fe

9 years agoMerge "Hide __libc_malloc_dispatch."
Dan Albert [Tue, 12 Aug 2014 23:55:17 +0000 (23:55 +0000)]
Merge "Hide __libc_malloc_dispatch."

9 years agoHide __libc_malloc_dispatch.
Dan Albert [Tue, 12 Aug 2014 23:21:26 +0000 (16:21 -0700)]
Hide __libc_malloc_dispatch.

Now that -Bsymbolic is fixed, we can hide __libc_malloc_dispatch without
breaking ASAN.

Bug: 11156955
Change-Id: Ia2fc9b046a74e666b33aa6c6c5435f70a63b8021

9 years agoMerge "Label pages mapped by linker_allocator"
Dmitriy Ivanov [Mon, 11 Aug 2014 16:36:33 +0000 (16:36 +0000)]
Merge "Label pages mapped by linker_allocator"

9 years agoLabel pages mapped by linker_allocator
Dmitriy Ivanov [Fri, 8 Aug 2014 23:57:15 +0000 (16:57 -0700)]
Label pages mapped by linker_allocator

Change-Id: I7e0bf29bc1a480e9be0d1ae573ca1063d90d82ff

9 years agoMerge "Fix our x86 PIC_PROLOGUE."
Elliott Hughes [Sun, 10 Aug 2014 05:19:22 +0000 (05:19 +0000)]
Merge "Fix our x86 PIC_PROLOGUE."

9 years agoFix our x86 PIC_PROLOGUE.
Elliott Hughes [Sun, 10 Aug 2014 01:45:55 +0000 (18:45 -0700)]
Fix our x86 PIC_PROLOGUE.

The old definition only worked for functions that didn't use numbered
local labels. Upstream uses '666' not only as some kind of BSD in-joke,
but also because there's little likelihood of any function having
labels that high.

There's a wider question about whether we actually want to go via the
PLT at all in this code, but that's a question for another day.

(cherry-pick of 72d7e667c7e926cb120c4edb53cbf74c652ab915.)

Bug: 16906712
Change-Id: I3cd8ecc448b33f942bb6e783931808ef39091489

9 years agoMerge "Make __set_errno hidden in asm."
Dan Albert [Fri, 8 Aug 2014 22:36:57 +0000 (22:36 +0000)]
Merge "Make __set_errno hidden in asm."

9 years agoMake __set_errno hidden in asm.
Dan Albert [Fri, 8 Aug 2014 22:19:20 +0000 (15:19 -0700)]
Make __set_errno hidden in asm.

This fixes the build after the -Bsymbolic change.

Bug: 16853291
Change-Id: I989c9fec3c32e0289ea257a3bd2b7fd2709b6ce2

9 years agoMerge "Revert "Fix incorrect relocations for x86.""
Dan Albert [Fri, 8 Aug 2014 22:35:00 +0000 (22:35 +0000)]
Merge "Revert "Fix incorrect relocations for x86.""

9 years agoRevert "Fix incorrect relocations for x86."
Dan Albert [Fri, 8 Aug 2014 22:15:29 +0000 (15:15 -0700)]
Revert "Fix incorrect relocations for x86."

Bug: 16853291
This reverts commit 512bc5232689bec9c763c8247b59de970096ff87.

9 years agoMerge "Add a way to disable backtracing in malloc debug."
Christopher Ferris [Fri, 8 Aug 2014 16:46:18 +0000 (16:46 +0000)]
Merge "Add a way to disable backtracing in malloc debug."

9 years agoAdd a way to disable backtracing in malloc debug.
Christopher Ferris [Thu, 7 Aug 2014 23:21:21 +0000 (16:21 -0700)]
Add a way to disable backtracing in malloc debug.

The property libc.debug.malloc.nobacktrace set to non-zero disables
getting backtracing when using mode 1 or mode 10.

Bug: 16874447

(cherry picked from 49de01a5be7bfb07baaea7415647d838383e1b59)

Change-Id: I6bbefe5420b14991fe84c2f849222dcd7cb592bf

9 years agoMerge "Remove misleading arm/arm64 PIC_SYM."
Elliott Hughes [Fri, 8 Aug 2014 16:16:48 +0000 (16:16 +0000)]
Merge "Remove misleading arm/arm64 PIC_SYM."

9 years agoRemove misleading arm/arm64 PIC_SYM.
Elliott Hughes [Thu, 7 Aug 2014 18:52:38 +0000 (11:52 -0700)]
Remove misleading arm/arm64 PIC_SYM.

Bug: 16823325
Change-Id: Ic8ff3a628bb4cd71361e3a1c2cfde4b3d39c50b1

9 years agoMerge "Create a distinct temp directory for each run."
Christopher Ferris [Fri, 8 Aug 2014 07:07:48 +0000 (07:07 +0000)]
Merge "Create a distinct temp directory for each run."

9 years agoCreate a distinct temp directory for each run.
Christopher Ferris [Tue, 5 Aug 2014 19:19:27 +0000 (12:19 -0700)]
Create a distinct temp directory for each run.

Modify make__NR_name so that only __ARM_NR_ is exempted from the
__NR_ being prepended. This avoids a case where using a name starting
with __ but is not a valid syscall name in SYSCALLS.TXT does not generate
code that will compile but references the function itself and causes
link errors.

Fix all of the directory references from dir_part1 + dir_part2 to
use os.path.join() instead.

Change-Id: Ib9527eba6f25f26a30c5cb0ad431f3f88a7683cf

9 years agoMerge "Android is all-PIC/PIE."
Elliott Hughes [Thu, 7 Aug 2014 18:25:35 +0000 (18:25 +0000)]
Merge "Android is all-PIC/PIE."

9 years agoAndroid is all-PIC/PIE.
Elliott Hughes [Thu, 7 Aug 2014 17:51:32 +0000 (10:51 -0700)]
Android is all-PIC/PIE.

Clean up the x86/x86_64 assembler. The motivator (other than reducing
confusion) was that asm.h incorrectly checked PIC rather than __PIC__.

Bug: 16823325
Change-Id: Iaa9d45009e93a4b31b719021c93ac221e336479b

9 years agoMerge "Fix incorrect relocations for x86."
Dan Albert [Thu, 7 Aug 2014 23:23:22 +0000 (23:23 +0000)]
Merge "Fix incorrect relocations for x86."

9 years agoFix incorrect relocations for x86.
Dan Albert [Thu, 7 Aug 2014 17:46:42 +0000 (10:46 -0700)]
Fix incorrect relocations for x86.

These calls were not going through the PLT like they should have been.

Bug: 16853291
Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c

9 years agoMerge "Do a second key cleanup in pthread_exit."
Christopher Ferris [Thu, 7 Aug 2014 01:04:21 +0000 (01:04 +0000)]
Merge "Do a second key cleanup in pthread_exit."

9 years agoDo a second key cleanup in pthread_exit.
Christopher Ferris [Wed, 6 Aug 2014 21:15:01 +0000 (14:15 -0700)]
Do a second key cleanup in pthread_exit.

During pthread_exit, the keys are cleaned. Unfortunately, a call to
free occurs after the cleanup and the memory for some of the keys
is recreated when using jemalloc. The solution is to do the key
cleanup twice.

Also, modify the pthread_detach__leak test to be less flaky
when run on a jemalloc system.

Bug: 16513133

(cherry picked from commit 18d93f2793fad393b6aa6eae6afe1054958339d5)

Change-Id: Idb32e7f9b09e2c088d256ed9eb881df80c81ff8e

9 years agoMerge "Upgrade bionic to tzdata2014f."
Elliott Hughes [Thu, 7 Aug 2014 00:38:29 +0000 (00:38 +0000)]
Merge "Upgrade bionic to tzdata2014f."

9 years agoUpgrade bionic to tzdata2014f.
Elliott Hughes [Wed, 6 Aug 2014 22:26:13 +0000 (15:26 -0700)]
Upgrade bionic to tzdata2014f.

From the release notes:

  Changes affecting future time stamps

    Russia will subtract an hour from most of its time zones on
    2014-10-26 at 02:00 local time.  (Thanks to Alexander Krivenyshev.)
    There are a few exceptions: Magadan Oblast (Asia/Magadan) and
    Zabaykalsky Krai are subtracting two hours; conversely, Chukotka
    Autonomous Okrug (Asia/Anadyr), Kamchatka Krai (Asia/Kamchatka),
    Kemerovo Oblast (Asia/Novokuznetsk), and the Samara Oblast and the
    Udmurt Republic (Europe/Samara) are not changing their clocks.  The
    changed zones are Europe/Kaliningrad, Europe/Moscow,
    Europe/Simferopol, Europe/Volgograd, Asia/Yekaterinburg, Asia/Omsk,
    Asia/Novosibirsk, Asia/Krasnoyarsk, Asia/Irkutsk, Asia/Yakutsk,
    Asia/Vladivostok, Asia/Khandyga, Asia/Sakhalin, and Asia/Ust-Nera;
    Asia/Magadan will have two hours subtracted; and Asia/Novokuznetsk's
    time zone abbreviation is affected, but not its UTC offset.  Two
    zones are added: Asia/Chita (split from Asia/Yakutsk, and also with
    two hours subtracted) and Asia/Srednekolymsk (split from
    Asia/Magadan, but with only one hour subtracted).  (Thanks to Tim
    Parenti for much of the above.)

  Changes affecting past time stamps

    China's five zones have been simplified to two, since the post-1970
    differences in the other three seem to have been imaginary.  The
    zones Asia/Harbin, Asia/Chongqing, and Asia/Kashgar have been
    removed; backwards-compatibility links still work, albeit with
    different behaviors for time stamps before May 1980.  Asia/Urumqi's
    1980 transition to UTC+8 has been removed, so that it is now at
    UTC+6 and not UTC+8.  (Thanks to Luther Ma and to Alois Treindl;
    Treindl sent helpful translations of two papers by Guo Qingsheng.)

    Some zones have been turned into links, when they differed from
    existing zones only for older UTC offsets where the data were likely
    invented.  These changes affect UTC offsets in pre-1970 time stamps
    only.  This is similar to the change in release 2013e, except this
    time for western Africa.  The affected zones are: Africa/Bamako,
    Africa/Banjul, Africa/Conakry, Africa/Dakar, Africa/Freetown,
    Africa/Lome, Africa/Nouakchott, Africa/Ouagadougou, Africa/Sao_Tome,
    and Atlantic/St_Helena.  This also affects the
    backwards-compatibility link Africa/Timbuktu.  (Thanks to Alan
    Barrett, Stephen Colebourne, Tim Parenti, and David Patte for
    reporting problems in earlier versions of this change.)

    Asia/Shanghai's pre-standard-time UT offset has been changed from
    8:05:57 to 8:05:43, the location of Xujiahui Observatory.  Its
    transition to standard time has been changed from 1928 to 1901.

    Asia/Taipei switched to JWST on 1896-01-01, then to JST on
    1937-10-01, then to CST on 1945-09-21 at 01:00, and did not observe
    DST in 1945.  In 1946 it observed DST from 05-15 through 09-30; in
    1947 from 04-15 through 10-31; and in 1979 from 07-01 through 09-30.
    (Thanks to Yu-Cheng Chuang.)

    Asia/Riyadh's transition to standard time is now 1947-03-14, not
    1950.

    Europe/Helsinki's 1942 fall-back transition was 10-04 at 01:00, not
    10-03 at 00:00.  (Thanks to Konstantin Hyppönen.)

    Pacific/Pago_Pago has been changed from UTC-11:30 to UTC-11 for the
    period from 1911 to 1950.

    Pacific/Chatham has been changed to New Zealand standard time plus
    45 minutes for the period before 1957, reflecting a 1956 remark in
    the New Zealand parliament.

    Europe/Budapest has several pre-1946 corrections: in 1918 the
    transition out of DST was on 09-16, not 09-29; in 1919 it was on
    11-24, not 09-15; in 1945 it was on 11-01, not 11-03; in 1941 the
    transition to DST was 04-08 not 04-06 at 02:00; and there was no DST
    in 1920.

    Africa/Accra is now assumed to have observed DST from 1920 through
    1935.

    Time in Russia before 1927 or so has been corrected by a few seconds
    in the following zones: Europe/Moscow, Asia/Irkutsk, Asia/Tbilisi,
    Asia/Tashkent, Asia/Vladivostok, Asia/Yekaterinburg,
    Europe/Helsinki, and Europe/Riga.  Also, Moscow's location has been
    changed to its Kilometer 0 point.  (Thanks to Vladimir Karpinsky for
    the Moscow changes.)

(cherry-pick of 0dc2c1db6fc84b4526f2a5f8d73e1187500f2300.)

Bug: 16168653
Change-Id: I23827254bcf50dd07a2192ed34b02224d73e07a0

9 years agoMerge "Fix the tzdata update tools."
Elliott Hughes [Thu, 7 Aug 2014 00:34:37 +0000 (00:34 +0000)]
Merge "Fix the tzdata update tools."

9 years agoFix the tzdata update tools.
Elliott Hughes [Wed, 6 Aug 2014 22:23:11 +0000 (15:23 -0700)]
Fix the tzdata update tools.

The recent libcore ZoneInfo changes mean that we can no longer
compile libcore's ZoneInfo against the RI. Luckily, the field in
our data file that we needed ZoneInfo for isn't actually used.
This change removes our dependence on libcore.

I've left the field in to avoid a file format change. We can remove
the field if/when we next have a real need to bump the file format.

(cherry-pick of 90cb5ffb85a9bc2e725824b3ca8db932d02c45db.)

Bug: 16168653
Change-Id: Iedad2252c2b49f4d8bb2c7d9078b39b622444ca7

9 years agoMerge "Revert "Add a hack to <stdlib.h> until we can fix libvpx.""
Elliott Hughes [Wed, 6 Aug 2014 20:23:26 +0000 (20:23 +0000)]
Merge "Revert "Add a hack to <stdlib.h> until we can fix libvpx.""

9 years agoRevert "Add a hack to <stdlib.h> until we can fix libvpx."
Elliott Hughes [Mon, 28 Jul 2014 23:16:38 +0000 (16:16 -0700)]
Revert "Add a hack to <stdlib.h> until we can fix libvpx."

This reverts commit 3fb5097a7eec40404760c304b36c8b657b374cab.
libvpx is now fixed.

(cherry-pick of 2be1be47aa9b63568fe6ce1e0a4029b37d90764d.)

Bug: 15598056
Change-Id: Icca974e667f92206505f484bd291726eb0150f68

9 years agoMerge "Workaround b/16818336 which fails build under aggressive inlining."
Elliott Hughes [Wed, 6 Aug 2014 18:46:24 +0000 (18:46 +0000)]
Merge "Workaround b/16818336 which fails build under aggressive inlining."

9 years agoWorkaround b/16818336 which fails build under aggressive inlining.
Dehao Chen [Tue, 5 Aug 2014 22:23:00 +0000 (15:23 -0700)]
Workaround b/16818336 which fails build under aggressive inlining.

(cherry-pick of 7aa27e1c1a53afe28f6180fd1fc50d096cabea7b.)

Change-Id: Ifcd596714c427a2ec39502b9c0af9082ded91884

9 years agoMerge "Explain how wcswcs ended up in ndk_cruft.cpp."
Elliott Hughes [Wed, 6 Aug 2014 17:55:27 +0000 (17:55 +0000)]
Merge "Explain how wcswcs ended up in ndk_cruft.cpp."

9 years agoExplain how wcswcs ended up in ndk_cruft.cpp.
Elliott Hughes [Wed, 6 Aug 2014 17:47:33 +0000 (10:47 -0700)]
Explain how wcswcs ended up in ndk_cruft.cpp.

Change-Id: Ie45148095b2d5c3896c0df623d5d06a700c33c70

9 years agoMerge "Add an obvious comment to <stdio.h> for fixincludes."
Elliott Hughes [Wed, 6 Aug 2014 16:04:48 +0000 (16:04 +0000)]
Merge "Add an obvious comment to <stdio.h> for fixincludes."

9 years agoAdd an obvious comment to <stdio.h> for fixincludes.
Elliott Hughes [Wed, 6 Aug 2014 00:07:46 +0000 (17:07 -0700)]
Add an obvious comment to <stdio.h> for fixincludes.

We don't want GCC's fixincludes to touch our <stdio.h> because we
want to support multiple platform versions with one toolchain. Give
them a nice easy unambiguous string to look for.

Bug: http://code.google.com/p/android/issues/detail?id=73728
Change-Id: I15cb9a2c9eb0a44b0965dc2139f224f2b6e68ea1

9 years agoMerge "Fixes build."
Dan Albert [Tue, 5 Aug 2014 21:47:45 +0000 (21:47 +0000)]
Merge "Fixes build."

9 years agoFixes build.
Dan Albert [Tue, 5 Aug 2014 21:46:03 +0000 (14:46 -0700)]
Fixes build.

This change somehow went missing from the vfork change.

Change-Id: I807a2072080eac20601c694e85ba5723220289d8

9 years agoMerge "Revert "Replaces vfork() implementation with fork()""
Dan Albert [Tue, 5 Aug 2014 21:29:41 +0000 (21:29 +0000)]
Merge "Revert "Replaces vfork() implementation with fork()""

9 years agoRevert "Replaces vfork() implementation with fork()"
Dan Albert [Tue, 5 Aug 2014 20:53:31 +0000 (20:53 +0000)]
Revert "Replaces vfork() implementation with fork()"

We're getting cold feet on this one... let's put it back.

This reverts commit 210331d9762037afb9b5ed8413079c6f65872df9.

Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269

9 years agoMerge "Fix mbsrtowcs(3) src param for finished string."
Dan Albert [Thu, 31 Jul 2014 20:52:19 +0000 (20:52 +0000)]
Merge "Fix mbsrtowcs(3) src param for finished string."

9 years agoFix mbsrtowcs(3) src param for finished string.
Dan Albert [Thu, 31 Jul 2014 18:31:03 +0000 (11:31 -0700)]
Fix mbsrtowcs(3) src param for finished string.

A mistake I made while cleaning this up the first time through.
mbstrtowcs(3) sets the src param to null if it finishes the string.

Change-Id: I6263646e25d9537043b7025fd1dd6ae195f365e2

9 years agoMerge "Proper MB_CUR_MAX."
Dan Albert [Thu, 31 Jul 2014 00:14:42 +0000 (00:14 +0000)]
Merge "Proper MB_CUR_MAX."

9 years agoProper MB_CUR_MAX.
Dan Albert [Wed, 30 Jul 2014 17:53:48 +0000 (10:53 -0700)]
Proper MB_CUR_MAX.

Previously this was hard coded to 4. This is only the case for UTF-8
locales.

As a side effect, this properly reports C.UTF-8 as the default locale
instead of C.

Change-Id: I7c73cc8fe6ffac61d211cd5f75287e36de06f4fc

9 years agoMerge "Fix memchr with a zero length."
Christopher Ferris [Wed, 30 Jul 2014 23:25:50 +0000 (23:25 +0000)]
Merge "Fix memchr with a zero length."

9 years agoFix memchr with a zero length.
Christopher Ferris [Wed, 30 Jul 2014 23:06:56 +0000 (16:06 -0700)]
Fix memchr with a zero length.

The memchr implementation for 64 bit fails if these conditions occur:

- The buffer is 32 byte aligned.
- The buffer contains the character in the first byte.
- The count sent in is zero.

The function should return NULL, but it's not.

Bug: 16676625
Change-Id: Iab33cc7a8b79920350c72f054dff0e0a3cde69ce

9 years agoMerge "Use libunwindbacktrace for debug malloc code."
Christopher Ferris [Wed, 30 Jul 2014 02:16:16 +0000 (02:16 +0000)]
Merge "Use libunwindbacktrace for debug malloc code."

9 years agoUse libunwindbacktrace for debug malloc code.
Christopher Ferris [Fri, 25 Jul 2014 00:52:23 +0000 (17:52 -0700)]
Use libunwindbacktrace for debug malloc code.

Create a method of disabling the debug allocation code paths so that
it's possible to use the libunwindbacktrace library without any
modifications.

Use this path to create and destroy the maps for the process. It's not
stricly necessary in the init code since the symbols are not modified
until after the initialize calls.

Also, remove the debug_XXX source files that doesn't need to be in libc.so.

Fix the maps reading code since it was completely broken for 64 bit.

Bug: 16408686

Change-Id: I6b02ef6ce26fdb7a59ad1029e7cbba9accceb704

9 years agoMerge "Fix linkage of grantpt(3)."
Elliott Hughes [Tue, 29 Jul 2014 17:43:10 +0000 (17:43 +0000)]
Merge "Fix linkage of grantpt(3)."

9 years agoFix linkage of grantpt(3).
Elliott Hughes [Sat, 26 Jul 2014 00:24:00 +0000 (17:24 -0700)]
Fix linkage of grantpt(3).

Also clean up the implementation of all the pty functions, add tests,
and fix the stub implementations of ttyname(3) and ttyname_r(3).

Bug: https://code.google.com/p/android/issues/detail?id=58888
Change-Id: I0fb36438cd1abf8d4e87c29415f03db9ba13c3c2

9 years agoMerge "Remove declarations for things that don't exist."
Elliott Hughes [Wed, 30 Jul 2014 00:36:51 +0000 (00:36 +0000)]
Merge "Remove declarations for things that don't exist."

9 years agoRemove declarations for things that don't exist.
Elliott Hughes [Tue, 29 Jul 2014 23:43:55 +0000 (16:43 -0700)]
Remove declarations for things that don't exist.

The <grp.h> ones prevent gdb from building out of the box.

Change-Id: I0efbffad2215cfcd75b4d442dfc972444b51d97c

9 years agoMerge "Fix dlsym(3) to do breadth first search."
Dmitriy Ivanov [Tue, 29 Jul 2014 21:42:55 +0000 (21:42 +0000)]
Merge "Fix dlsym(3) to do breadth first search."

9 years agoFix dlsym(3) to do breadth first search.
Dmitriy Ivanov [Tue, 29 Jul 2014 00:32:20 +0000 (17:32 -0700)]
Fix dlsym(3) to do breadth first search.

  dlsym(3) with handle != RTLD_DEFAULT|RTLD_NEXT performs
  breadth first search through the dependency tree.

Bug: 16653281
Change-Id: I017a6975d1a62abb0218a7eb59ae4deba458e324

9 years agoMerge "Added a bionic systrace class and tracing to pthread_mutex.cpp."
Elliott Hughes [Tue, 29 Jul 2014 16:38:31 +0000 (16:38 +0000)]
Merge "Added a bionic systrace class and tracing to pthread_mutex.cpp."

9 years agoAdded a bionic systrace class and tracing to pthread_mutex.cpp.
Brigid Smith [Mon, 21 Jul 2014 22:38:06 +0000 (15:38 -0700)]
Added a bionic systrace class and tracing to pthread_mutex.cpp.

bionic_systrace.h contains an implementation of tracing that
can be used with systrace.py and its associated viewer.  pthread_mutex
now uses this tracing to track pthread_mutex contention, which can be
enabled by using the "bionic" command line option to systrace.

Bug: 15116468
Change-Id: I30ed5b377c91ca4c36568a0e647ddf95d4e4a61a

9 years agoMerge "Fix mips/mips64 build"
Dmitriy Ivanov [Tue, 29 Jul 2014 04:58:16 +0000 (04:58 +0000)]
Merge "Fix mips/mips64 build"

9 years agoFix mips/mips64 build
Dmitriy Ivanov [Tue, 29 Jul 2014 00:53:29 +0000 (17:53 -0700)]
Fix mips/mips64 build

 Add _start entry label to mips/mips64 linker begin.S

Change-Id: Idcdfc3391427b53880650798be0583a7ac022bcc

9 years agoMerge "Start hiding "private/bionic_time.h"."
Elliott Hughes [Fri, 25 Jul 2014 22:01:28 +0000 (22:01 +0000)]
Merge "Start hiding "private/bionic_time.h"."

9 years agoStart hiding "private/bionic_time.h".
Elliott Hughes [Fri, 25 Jul 2014 18:55:59 +0000 (11:55 -0700)]
Start hiding "private/bionic_time.h".

Bug: 15765976
Change-Id: Ibd9cf07067ec8dffe9fda6c3d498d4ab90708220

9 years agoMerge "en_US.UTF-8 is also supported."
Dan Albert [Fri, 25 Jul 2014 18:35:03 +0000 (18:35 +0000)]
Merge "en_US.UTF-8 is also supported."

9 years agoen_US.UTF-8 is also supported.
Dan Albert [Fri, 25 Jul 2014 18:24:03 +0000 (11:24 -0700)]
en_US.UTF-8 is also supported.

Change-Id: Ic35fad3596dc5e24ee8ae35543a274a471f27bb2

9 years agoMerge "Implement <sys/fsuid.h>."
Elliott Hughes [Wed, 30 Jul 2014 23:16:27 +0000 (23:16 +0000)]
Merge "Implement <sys/fsuid.h>."

9 years agoImplement <sys/fsuid.h>.
Elliott Hughes [Wed, 30 Jul 2014 22:05:09 +0000 (15:05 -0700)]
Implement <sys/fsuid.h>.

Change-Id: I1e5e50444a1b5a430ba5b5d9b8b1d91219af5e92

9 years agoMerge "[MIPSR6] Use C-coded string ops on mips32r6/mips64r6"
Elliott Hughes [Wed, 30 Jul 2014 22:15:43 +0000 (22:15 +0000)]
Merge "[MIPSR6] Use C-coded string ops on mips32r6/mips64r6"

9 years agoMerge "Only wipe TLS for user-supplied stacks."
Elliott Hughes [Wed, 30 Jul 2014 21:55:13 +0000 (21:55 +0000)]
Merge "Only wipe TLS for user-supplied stacks."

9 years agoOnly wipe TLS for user-supplied stacks.
Elliott Hughes [Wed, 30 Jul 2014 21:48:10 +0000 (14:48 -0700)]
Only wipe TLS for user-supplied stacks.

Bug: 16667988
Change-Id: Id180ab2bc6713e1612386120a306db5bbf1d6046

9 years agoMerge "[MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic...
Elliott Hughes [Thu, 24 Jul 2014 23:20:59 +0000 (23:20 +0000)]
Merge "[MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS."

9 years ago[MIPS] Fix atomic_is_lock_free test for mips32.
Raghu Gandham [Thu, 24 Jul 2014 22:56:51 +0000 (15:56 -0700)]
[MIPS] Fix atomic_is_lock_free test for mips32.
On 32-bit MIPS, 64-bit atomic ops are achieved through locks.
So allow the test to fail for atomic_intmax_t on 32-bit MIPS.

Change-Id: I78e7807e50f899a0fea0d5b388d9ebb53228aaa0

9 years agoMerge "Fix global variable initialization for linker"
Dmitriy Ivanov [Thu, 24 Jul 2014 23:09:17 +0000 (23:09 +0000)]
Merge "Fix global variable initialization for linker"

9 years agoFix global variable initialization for linker
Dmitriy Ivanov [Thu, 24 Jul 2014 22:33:25 +0000 (15:33 -0700)]
Fix global variable initialization for linker

 Linker now calls init functions for itself.

Change-Id: Ibd099812493041ac70f591e3f379ee742b4683b8

9 years agoMerge "Implement twalk(3), add unit tests."
Elliott Hughes [Thu, 24 Jul 2014 22:11:05 +0000 (22:11 +0000)]
Merge "Implement twalk(3), add unit tests."

9 years agoImplement twalk(3), add unit tests.
Elliott Hughes [Wed, 23 Jul 2014 23:02:26 +0000 (16:02 -0700)]
Implement twalk(3), add unit tests.

I've also added insque(3) and remque(3) (from NetBSD because the OpenBSD
ones are currently broken for non-circular lists).

I've not added the three hash table functions that should be in this header
because they operate on a single global hash table and thus aren't likely
to be useful.

Bug: https://code.google.com/p/android/issues/detail?id=73719
Change-Id: I97397a7b921e2e860fd9c8032cafd9097380498a

9 years ago[MIPSR6] Use C-coded string ops on mips32r6/mips64r6
Duane Sand [Thu, 10 Jul 2014 22:24:27 +0000 (15:24 -0700)]
[MIPSR6] Use C-coded string ops on mips32r6/mips64r6

The existing assembler code uses deprecated lwl/lwr/swl/swr ops.
Replacing those with misalignment-forgiving lw/sw ops may
involve careful performance tuning.

Change-Id: I47a042f7b22b87d7d52e46c29c44b1db1ba8b693

9 years agoMerge "[MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models"
Elliott Hughes [Thu, 24 Jul 2014 03:57:12 +0000 (03:57 +0000)]
Merge "[MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models"

9 years ago[MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models
Duane Sand [Mon, 14 Jul 2014 22:30:14 +0000 (15:30 -0700)]
[MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models

Save and restore floating point registers via 64-bit
load/stores when possible.  Use assembler's builtin macro
ops to generate pairs of 32-bit load/stores on Mips I cpus.

Some cpus or FR modes have only 16 even-numbered dp fp regs.
This is exposed by _MIPS_FPSET, defined by existing compilers.

Change-Id: I7f617a3ffea8da41c402ef3a68ab32c91d3d7622

9 years agoMerge "debuggerd: if PR_GET_DUMPABLE=0, don't ask for dumping"
Nick Kralevich [Wed, 23 Jul 2014 22:51:37 +0000 (22:51 +0000)]
Merge "debuggerd: if PR_GET_DUMPABLE=0, don't ask for dumping"

9 years agodebuggerd: if PR_GET_DUMPABLE=0, don't ask for dumping
Nick Kralevich [Wed, 23 Jul 2014 20:56:23 +0000 (13:56 -0700)]
debuggerd: if PR_GET_DUMPABLE=0, don't ask for dumping

PR_GET_DUMPABLE is used by an application to indicate whether or
not core dumps / PTRACE_ATTACH should work.

Security sensitive applications often set PR_SET_DUMPABLE to 0 to
disable core dumps, to avoid leaking sensitive memory to persistent
storage. Similarly, they also set PR_SET_DUMPABLE to zero to prevent
PTRACE_ATTACH from working, again to avoid leaking the contents
of sensitive memory.

Honor PR_GET_DUMPABLE when connecting to debuggerd. If an application
has said it doesn't want its memory dumped, then we shouldn't
ask debuggerd to dump memory on its behalf.

FORTIFY_SOURCE tests: Modify the fortify_source tests to set
PR_SET_DUMPABLE=0. This reduces the total runtime of
/data/nativetest/bionic-unit-tests/bionic-unit-tests32 from approx
53 seconds to 25 seconds. There's no need to connect to debuggerd
when running these tests.

Bug: 16513137
Change-Id: Idc7857b089f3545758f4d9b436b783d580fb653f

9 years agoMerge "Fix belated review comments on syslog change."
Elliott Hughes [Wed, 23 Jul 2014 20:07:38 +0000 (20:07 +0000)]
Merge "Fix belated review comments on syslog change."

9 years agoFix belated review comments on syslog change.
Elliott Hughes [Wed, 23 Jul 2014 18:38:38 +0000 (11:38 -0700)]
Fix belated review comments on syslog change.

Bug: 14292866
Change-Id: I3cd92084cb55b5673f6ba62d51952941b79deb51

9 years agoMerge "Fix 'adb shell /system/bin/linker' crash"
Dmitriy Ivanov [Mon, 28 Jul 2014 23:38:32 +0000 (23:38 +0000)]
Merge "Fix 'adb shell /system/bin/linker' crash"

9 years agoFix 'adb shell /system/bin/linker' crash
Dmitriy Ivanov [Mon, 28 Jul 2014 22:05:51 +0000 (15:05 -0700)]
Fix 'adb shell /system/bin/linker' crash

Bug: https://code.google.com/p/android/issues/detail?id=63174
Change-Id: I072290ea11109c07f277ad3dec7f44fcb7bf6aa6

9 years agoMerge "syscall(3)'s return type should be long."
Elliott Hughes [Mon, 28 Jul 2014 22:33:51 +0000 (22:33 +0000)]
Merge "syscall(3)'s return type should be long."

9 years agosyscall(3)'s return type should be long.
Elliott Hughes [Mon, 28 Jul 2014 19:24:22 +0000 (12:24 -0700)]
syscall(3)'s return type should be long.

This doesn't require us to change any of the syscall implementations
because (a) the LP32 ones have sizeof(int) == sizeof(long) anyway,
which is how we never noticed this bug before and (b) the LP64 ones
all use a 64-bit register for the result (and for the syscall number
too).

Bug: https://code.google.com/p/android/issues/detail?id=73952
Change-Id: I9866c3579a7a94de27bfbe80ad7a822c3183c7fb

9 years agoMerge "Remove localtime_tz and strftime_tz."
Elliott Hughes [Fri, 25 Jul 2014 23:19:40 +0000 (23:19 +0000)]
Merge "Remove localtime_tz and strftime_tz."

9 years agoRemove localtime_tz and strftime_tz.
Elliott Hughes [Fri, 25 Jul 2014 22:50:31 +0000 (15:50 -0700)]
Remove localtime_tz and strftime_tz.

This also brings our copy of strftime.c much closer to upstream, though
we still have several GNU extensions and hacks to deal with Android32's
broken time_t.

Bug: 15765976
Change-Id: Ic9ef36e8acd3619504ecc4d73feec2b61fd4dfa1

9 years agoMerge "Use vsnprintf(3) in syslog(3)."
Elliott Hughes [Mon, 28 Jul 2014 16:44:57 +0000 (16:44 +0000)]
Merge "Use vsnprintf(3) in syslog(3)."

9 years agoUse vsnprintf(3) in syslog(3).
Elliott Hughes [Sat, 26 Jul 2014 03:31:47 +0000 (20:31 -0700)]
Use vsnprintf(3) in syslog(3).

It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

(cherry-pick of b1b60c30bf321c0fc02264b953b5c16c49d34457.)

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5

9 years agoMerge "[MIPS] Drop soft-fp targets"
Elliott Hughes [Thu, 24 Jul 2014 18:06:45 +0000 (18:06 +0000)]
Merge "[MIPS] Drop soft-fp targets"

9 years ago[MIPS] Drop soft-fp targets
Duane Sand [Thu, 24 Jul 2014 17:56:54 +0000 (10:56 -0700)]
[MIPS] Drop soft-fp targets

Change-Id: I583bf8242d3034ebfc48548499cdb3316094c8e3

9 years agoMerge "Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros."
Elliott Hughes [Wed, 23 Jul 2014 18:34:15 +0000 (18:34 +0000)]
Merge "Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros."

9 years agoFix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
Elliott Hughes [Wed, 23 Jul 2014 18:10:48 +0000 (11:10 -0700)]
Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.

Change-Id: I99f9d2e0a28342663cec6aed483e1a23c12e5e87

9 years agoMerge "Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files."
Elliott Hughes [Wed, 23 Jul 2014 16:37:52 +0000 (16:37 +0000)]
Merge "Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files."

9 years agoFix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
Elliott Hughes [Wed, 23 Jul 2014 04:24:47 +0000 (21:24 -0700)]
Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.

Change-Id: Id6fcb74292e661504d0758bfce24abdc18cb8d32

9 years agoMerge "Remove the unused swab.S."
Elliott Hughes [Wed, 23 Jul 2014 03:27:59 +0000 (03:27 +0000)]
Merge "Remove the unused swab.S."

9 years agoRemove the unused swab.S.
Elliott Hughes [Wed, 23 Jul 2014 03:21:31 +0000 (20:21 -0700)]
Remove the unused swab.S.

Change-Id: Id30eac5a21b649d6a039a0d7ca0496177fbfb571

9 years agoMerge "[MIPS] Allow united mipsel and mips64el gcc toolchain"
Elliott Hughes [Wed, 23 Jul 2014 02:39:15 +0000 (02:39 +0000)]
Merge "[MIPS] Allow united mipsel and mips64el gcc toolchain"

9 years ago[MIPS] Allow united mipsel and mips64el gcc toolchain
Duane Sand [Wed, 16 Jul 2014 19:29:34 +0000 (12:29 -0700)]
[MIPS] Allow united mipsel and mips64el gcc toolchain

Explicitly tell 32-bit links that they are doing 32-bit links.
This is needed when using united 32-bit and 64-bit toolchains.
This is harmless when using older separate 32-only toolchains.

Change-Id: I70cbd3f5867e59b1f6f829793444242fb0894aa6

9 years agoMerge "Use upstream OpenBSD's arc4random."
Elliott Hughes [Tue, 22 Jul 2014 01:59:20 +0000 (01:59 +0000)]
Merge "Use upstream OpenBSD's arc4random."

9 years agoUse upstream OpenBSD's arc4random.
Elliott Hughes [Fri, 18 Jul 2014 22:57:41 +0000 (15:57 -0700)]
Use upstream OpenBSD's arc4random.

The getentropy_linux.c is lightly modified to build on Android, but we're now
completely in sync with upstream OpenBSD's arc4random implementation.

Change-Id: If32229fc28aba908035fb38703190d41ddcabc95

10 years agoMerge "Rewrite syslog(3) to use Android logging."
Elliott Hughes [Tue, 22 Jul 2014 01:47:48 +0000 (01:47 +0000)]
Merge "Rewrite syslog(3) to use Android logging."