OSDN Git Service

android-x86/bionic.git
11 years agoUpgrade to tzdata2012f.
Elliott Hughes [Thu, 13 Sep 2012 21:54:51 +0000 (14:54 -0700)]
Upgrade to tzdata2012f.

This release reflects the following change circulated on the tz
mailing list:

  * australasia (Pacific/Fiji): Fiji DST is October 21 through January
    20 this year.  (Thanks to Steffen Thorsen.)

Change-Id: Ie21ea791ff5191264967aff685cbfa5c73f1fa5c

11 years agoMerge "Add libdl into libc_malloc_debug_leak build"
Elliott Hughes [Thu, 13 Sep 2012 16:46:30 +0000 (09:46 -0700)]
Merge "Add libdl into libc_malloc_debug_leak build"

11 years agoMerge "Added new test for dlopen which is failing for MIPS."
Elliott Hughes [Thu, 13 Sep 2012 16:42:49 +0000 (09:42 -0700)]
Merge "Added new test for dlopen which is failing for MIPS."

11 years agoAdd libdl into libc_malloc_debug_leak build
Pavel Chupin [Mon, 10 Sep 2012 15:35:25 +0000 (19:35 +0400)]
Add libdl into libc_malloc_debug_leak build

Otherwise libc_malloc_debug_leak.so is failed to load runtime in x86
case

Change-Id: I8207ce06d1ec17b233f4e4fcfdd2b161673b4fa8
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
11 years agoAdded new test for dlopen which is failing for MIPS.
jeffhao [Thu, 13 Sep 2012 00:25:30 +0000 (17:25 -0700)]
Added new test for dlopen which is failing for MIPS.

Change-Id: I2240faefb387a11647f49b1a15699907a40f98c1

11 years agoMerge "Update the kernel headers to match external/kernel-headers."
Elliott Hughes [Wed, 12 Sep 2012 22:56:10 +0000 (15:56 -0700)]
Merge "Update the kernel headers to match external/kernel-headers."

11 years agoUpdate the kernel headers to match external/kernel-headers.
Elliott Hughes [Wed, 12 Sep 2012 02:03:02 +0000 (19:03 -0700)]
Update the kernel headers to match external/kernel-headers.

Note that the Linux kernel handed over responsibility for most of the
socket constants to glibc some time ago. Someone had updated our
external/kernel-headers file but not regenerated the bionic headers,
so this change copies the missing stuff from the old bionic <linux/socket.h>
into <sys/socket.h>. This is what glibc does.

I've hacked a few of the other files to #include <sys/socket.h> for
backward compatibility, but even so this requires numerous other
changes to switch people over from direct inclusion of <linux/...> headers.

Change-Id: I0e4af64e631d3cef911a31d90f2f806e058278a0

11 years agoMerge "Backwards and forwards compatibility for an upcoming <sys/socket.h> change."
Elliott Hughes [Wed, 12 Sep 2012 17:51:48 +0000 (10:51 -0700)]
Merge "Backwards and forwards compatibility for an upcoming <sys/socket.h> change."

11 years agoBackwards and forwards compatibility for an upcoming <sys/socket.h> change.
Elliott Hughes [Wed, 12 Sep 2012 17:51:05 +0000 (10:51 -0700)]
Backwards and forwards compatibility for an upcoming <sys/socket.h> change.

Change-Id: Iba58077a1f057a968eb2283ebba259975925ff4c

11 years agoMerge "[MIPS] Check error status from pipe system call"
Elliott Hughes [Tue, 11 Sep 2012 23:38:43 +0000 (16:38 -0700)]
Merge "[MIPS] Check error status from pipe system call"

11 years ago[MIPS] Check error status from pipe system call
KwongYuan Wong [Tue, 27 Mar 2012 18:13:13 +0000 (11:13 -0700)]
[MIPS] Check error status from pipe system call

Change-Id: Iaaea0e826c2678aa7f6fad9d46b16302a4d3b876

11 years agoMerge "Rename crtstart variables as crtbegin, to match reality."
Elliott Hughes [Mon, 10 Sep 2012 18:52:11 +0000 (11:52 -0700)]
Merge "Rename crtstart variables as crtbegin, to match reality."

11 years agoRename crtstart variables as crtbegin, to match reality.
Elliott Hughes [Mon, 10 Sep 2012 18:16:12 +0000 (11:16 -0700)]
Rename crtstart variables as crtbegin, to match reality.

No functional change, but it's confusing that the variable
names don't match the filenames.

Change-Id: I7109f917797be2f056e69fddb92e4a7306281813

11 years agoMerge "Generate header dependency makefiles for the crt*.o"
Ying Wang [Mon, 10 Sep 2012 16:48:45 +0000 (09:48 -0700)]
Merge "Generate header dependency makefiles for the crt*.o"

11 years agoMerge "Add more pthreads tests."
Elliott Hughes [Sat, 8 Sep 2012 01:30:17 +0000 (18:30 -0700)]
Merge "Add more pthreads tests."

11 years agoGenerate header dependency makefiles for the crt*.o
Ying Wang [Sat, 8 Sep 2012 00:06:56 +0000 (17:06 -0700)]
Generate header dependency makefiles for the crt*.o

Bug: 7127743
Change-Id: I606e5f7cd2b513f855a1fefd2b001abd365fc854

11 years agoAdd more pthreads tests.
Elliott Hughes [Fri, 7 Sep 2012 23:47:54 +0000 (16:47 -0700)]
Add more pthreads tests.

Someone reported a bug if pthread_detach is called while a pthread_join is
already in progress, but I'm unable to reproduce it. Keep the tests I wrote,
though.

Change-Id: I3d71450bbbb5345f2cb213dc56310ec020d528cc

11 years agoMerge "Rename __dso_handle_so.c to __dso_handle_so.h"
Elliott Hughes [Fri, 7 Sep 2012 17:59:20 +0000 (10:59 -0700)]
Merge "Rename __dso_handle_so.c to __dso_handle_so.h"

11 years agoMerge "Add mlockall and munlockall for Google TV."
Elliott Hughes [Fri, 7 Sep 2012 17:51:49 +0000 (10:51 -0700)]
Merge "Add mlockall and munlockall for Google TV."

11 years agoRename __dso_handle_so.c to __dso_handle_so.h
Andrew Hsieh [Wed, 5 Sep 2012 11:00:43 +0000 (19:00 +0800)]
Rename __dso_handle_so.c to __dso_handle_so.h

Also chang libc/arch-arm/bionic/crtbegin_so.c to include it
as a header.

Change-Id: Ib91b0b8caf5c8b936425aa8a4fc1a229b2b27929

11 years agoMerge "Fix build warning of initialization but no use."
Ian Rogers [Thu, 6 Sep 2012 18:41:52 +0000 (11:41 -0700)]
Merge "Fix build warning of initialization but no use."

11 years agoAdd mlockall and munlockall for Google TV.
Elliott Hughes [Thu, 6 Sep 2012 18:24:45 +0000 (11:24 -0700)]
Add mlockall and munlockall for Google TV.

Change-Id: I10e961d701e74aab07211ec7975f61167e387853

11 years agoMerge "Don't corrupt the thread list in static executables."
Elliott Hughes [Thu, 6 Sep 2012 17:31:52 +0000 (10:31 -0700)]
Merge "Don't corrupt the thread list in static executables."

11 years agoFix build warning of initialization but no use.
Ian Rogers [Thu, 6 Sep 2012 16:55:36 +0000 (09:55 -0700)]
Fix build warning of initialization but no use.

first_run is only used with LOCK_AT_FORK, however, care needs to be
taken with the #if to avoid compiler warnings when LOCK_AT_FORK isn't
being used.

Change-Id: I6bcfac2ab8732c91607f4a1bcd7c0019f29c2eec

11 years agoDon't corrupt the thread list in static executables.
Elliott Hughes [Thu, 6 Sep 2012 00:47:37 +0000 (17:47 -0700)]
Don't corrupt the thread list in static executables.

Several previous changes conspired to make a mess of the thread list
in static binaries. This was most obvious when trying to call
pthread_key_delete(3) on the main thread.

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

11 years agoMerge "Add missing dependencies."
Elliott Hughes [Wed, 5 Sep 2012 21:46:14 +0000 (14:46 -0700)]
Merge "Add missing dependencies."

11 years agoAdd missing dependencies.
Elliott Hughes [Wed, 5 Sep 2012 21:27:17 +0000 (14:27 -0700)]
Add missing dependencies.

Change-Id: I53c1cfb59ac7a89952a8d6b906b2b9e16a66624f

11 years agoMerge "ARM: warn about atexit() calls from legacy shared libraries"
Elliott Hughes [Wed, 5 Sep 2012 17:18:43 +0000 (10:18 -0700)]
Merge "ARM: warn about atexit() calls from legacy shared libraries"

11 years agoMerge "ARM: make CRT_LEGACY_WORKAROUND work as intended"
Elliott Hughes [Wed, 5 Sep 2012 16:43:35 +0000 (09:43 -0700)]
Merge "ARM: make CRT_LEGACY_WORKAROUND work as intended"

11 years agoMerge "Avoid malloc lock while calling pthread_atfork."
Ian Rogers [Wed, 5 Sep 2012 14:41:31 +0000 (07:41 -0700)]
Merge "Avoid malloc lock while calling pthread_atfork."

11 years agoMerge "termios: add tcdrain"
Elliott Hughes [Wed, 5 Sep 2012 00:52:39 +0000 (17:52 -0700)]
Merge "termios: add tcdrain"

11 years agoMerge "Add getsid system call to bionic"
Elliott Hughes [Tue, 4 Sep 2012 23:36:26 +0000 (16:36 -0700)]
Merge "Add getsid system call to bionic"

11 years agoMerge "Add missing MALLOC_FAILURE_ACTION calls to dlmalloc."
Elliott Hughes [Tue, 4 Sep 2012 22:51:55 +0000 (15:51 -0700)]
Merge "Add missing MALLOC_FAILURE_ACTION calls to dlmalloc."

11 years agoAdd missing MALLOC_FAILURE_ACTION calls to dlmalloc.
Elliott Hughes [Tue, 4 Sep 2012 22:42:23 +0000 (15:42 -0700)]
Add missing MALLOC_FAILURE_ACTION calls to dlmalloc.

Without these, sometimes malloc(3) returns NULL without setting errno.

Change-Id: I4708c3f675bf2c878ddcaf012fde7848b255826b

11 years agoMerge "bionic: Fix TINY_ANDROID build"
Elliott Hughes [Tue, 4 Sep 2012 20:42:57 +0000 (13:42 -0700)]
Merge "bionic: Fix TINY_ANDROID build"

11 years agobionic: Fix TINY_ANDROID build
Benoit Goby [Sat, 1 Sep 2012 02:52:15 +0000 (19:52 -0700)]
bionic: Fix TINY_ANDROID build

(cherry-pick of 545d5dbbcb0dc9e44323c4f2e687a3aace75a483.)

Change-Id: Ifc91e84ffed5a3a287accabd7f08b02752688db6

11 years agotermios: add tcdrain
Vitaly Wool [Tue, 4 Sep 2012 12:11:28 +0000 (14:11 +0200)]
termios: add tcdrain

Change-Id: I05c0007f7bcc6ef5295c32f86fafbf1ad31e07fa

11 years agoAdd getsid system call to bionic
Irina Tirdea [Wed, 29 Aug 2012 08:48:35 +0000 (11:48 +0300)]
Add getsid system call to bionic

Add getsid() system call to bionic for
all architectures. This is needed for various tools
(e.g. perf).

Adding the getsid system call was done in 3 steps:
() add getsid system call (function name and syscall
number) to libc/SYSCALLS.TXT
() generate all necessary headers by calling
libc/tools/gensyscalls.py. This patch is adding
the generated files since the build system
does not call gensyscalls.py.
() add the system call signature to libc/include/unistd.h

Change-Id: Id69a257e13ec02e1a44085a6b217a3f19ab025b1
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
11 years agoAvoid malloc lock while calling pthread_atfork.
Kirill Artamonov [Fri, 31 Aug 2012 16:19:16 +0000 (09:19 -0700)]
Avoid malloc lock while calling pthread_atfork.

Expecting the memory in a forked child process to be sane wrt threading
is a bad idea. An example of a problem is when the parent process has
the malloc lock and a child process is forked. The malloc lock in the
child will appear locked by a thread that doesn't exist.

This change aims to make bionic more compatible with glibc by reseting
the malloc lock in the child forked process, as well as holding it
during the fork. This is a feature in dlmalloc 2.8.6 called
LOCK_AT_FORK. In general this feature isn't necessary as a forked
process will then exec. Some bad applications rely on being able to use
features like malloc before the exec and having multiple threads running
in the parent program. This isn't a problem with glibc and this patch
makes it not a problem for bionic.

Unfortunately for use in bionic, LOCK_AT_FORK has an issue as internally
it uses pthread_atfork that in bionic uses malloc. This leads to the
LOCK_AT_FORK initialization deadlocking with pthread_atfork's call to
malloc due to the malloc lock. This change moves the pthread_atfork logic
in LOCK_AT_FORK to be called without the malloc lock held.

Change-Id: Id68175a564a6abb936ee4488b44d9479f7311f69

11 years agoMerge "Upgrade to dlmalloc 2.8.6."
Ian Rogers [Fri, 31 Aug 2012 15:42:40 +0000 (08:42 -0700)]
Merge "Upgrade to dlmalloc 2.8.6."

11 years agoUpgrade to dlmalloc 2.8.6.
Ian Rogers [Wed, 29 Aug 2012 21:04:53 +0000 (14:04 -0700)]
Upgrade to dlmalloc 2.8.6.

This fixes a bug and enables the use of MORECORE_CONTIGUOUS.

Change-Id: Ia7c5d32bdc46e99b3ecb92ee94d1f702c4385d5d

11 years agoMerge "Improve the dynamic linker diagnostics."
Elliott Hughes [Wed, 29 Aug 2012 20:56:40 +0000 (13:56 -0700)]
Merge "Improve the dynamic linker diagnostics."

11 years agoMerge "disable _FORTIFY_SOURCE under clang"
Nick Kralevich [Wed, 29 Aug 2012 20:54:49 +0000 (13:54 -0700)]
Merge "disable _FORTIFY_SOURCE under clang"

11 years agoImprove the dynamic linker diagnostics.
Elliott Hughes [Wed, 29 Aug 2012 20:10:54 +0000 (13:10 -0700)]
Improve the dynamic linker diagnostics.

Lose the pid, only show the name of the function (not its whole signature),
and include the name of the library we failed to load. (I hadn't noticed
that the library name was missing before because in Java we add that into
the UnsatisfiedLinkError detail message.)

The new output looks like this:

  Cannot load library: soinfo_relocate(linker.cpp:968): cannot locate symbol "__libc_malloc_default_dispatch" referenced by "libc_malloc_debug_leak.so"...

Change-Id: I3bb5c9780d9aaf3a9e4418ea55bc98122a81f80f

11 years agoMerge "Clean up warnings in the malloc_debug_* files."
Elliott Hughes [Wed, 29 Aug 2012 20:08:50 +0000 (13:08 -0700)]
Merge "Clean up warnings in the malloc_debug_* files."

11 years agodisable _FORTIFY_SOURCE under clang
Nick Kralevich [Wed, 29 Aug 2012 19:40:53 +0000 (12:40 -0700)]
disable _FORTIFY_SOURCE under clang

Clang and _FORTIFY_SOURCE are just plain incompatible with
each other.  First of all, clang doesn't understand the
__attribute__((gnu_inline)) header. Second of all,
Clang doesn't have support for __builtin_va_arg_pack()
and __builtin_va_arg_pack_len() (see
http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc)

Until we can resolve these issues, don't even try using
_FORTIFY_SOURCE under clang.

Change-Id: I81c2b8073bb3276fa9a4a6b93c427b641038356a

11 years agoClean up warnings in the malloc_debug_* files.
Elliott Hughes [Tue, 28 Aug 2012 21:15:04 +0000 (14:15 -0700)]
Clean up warnings in the malloc_debug_* files.

Also clean up cpplint.py-detected lint.

Change-Id: Ia18e89c4c6878764f8d7ed34b8247e7a8d8fe88b

11 years agoMerge "ARM: make sure __on_dlclose() actually gets called"
Nick Kralevich [Tue, 28 Aug 2012 20:04:22 +0000 (13:04 -0700)]
Merge "ARM: make sure __on_dlclose() actually gets called"

11 years agoMerge "ARM: remove dummy entries from .so init_array/fini_array"
Nick Kralevich [Tue, 28 Aug 2012 19:49:46 +0000 (12:49 -0700)]
Merge "ARM: remove dummy entries from .so init_array/fini_array"

11 years agoMerge "linker: Fix ARM_R_COPY relocations"
Nick Kralevich [Tue, 28 Aug 2012 19:48:00 +0000 (12:48 -0700)]
Merge "linker: Fix ARM_R_COPY relocations"

11 years agolinker: Fix ARM_R_COPY relocations
Nick Kralevich [Fri, 24 Aug 2012 20:25:51 +0000 (13:25 -0700)]
linker: Fix ARM_R_COPY relocations

Per http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044d/IHI0044D_aaelf.pdf
Section 4.7.1.10, ARM_R_COPY relocations are only suppose to reference shared
libraries, not the executable itself.  When resolving an R_ARM_COPY symbol,
ensure we don't look in our own symbol.

This partially addresses
http://code.google.com/p/android/issues/detail?id=28598 .  After this
patch, the printfs generated by the test program are:

global = 0x42 (0x401c7000)
global = 0x42 (0x11000)

before, the output was:

global = 0x42 (0x40071000)
global = 0x0 (0x11000)

I'm still not very happy with this patch, but I think it's an improvement
over where we were at before.

This change was modeled after https://android-review.googlesource.com/38871

Change-Id: Id7ad921e58395e76a36875bcc742ec5eeba53f08

11 years agoMerge "libc: remove ctors/dtors sections"
Nick Kralevich [Tue, 28 Aug 2012 17:20:27 +0000 (10:20 -0700)]
Merge "libc: remove ctors/dtors sections"

11 years agoARM: warn about atexit() calls from legacy shared libraries
Ard Biesheuvel [Tue, 28 Aug 2012 09:23:06 +0000 (11:23 +0200)]
ARM: warn about atexit() calls from legacy shared libraries

Legacy ARM shared libraries use this generic version of atexit(),
which queues exit functions for invocation at program exit, at
which time the library may have been dlclose()'d, causing the
program to crash.

Change-Id: I41ae153c23268daa65ede7fb8966fc3e9caec369
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
11 years agoARM: make CRT_LEGACY_WORKAROUND work as intended
Ard Biesheuvel [Tue, 21 Aug 2012 12:13:50 +0000 (14:13 +0200)]
ARM: make CRT_LEGACY_WORKAROUND work as intended

To properly support legacy ARM shared libraries, libc.so needs
to export the symbols __dso_handle and atexit, even though
these are now supplied by the crt startup code.

This patch reshuffles the existing CRT_LEGACY_WORKAROUND
conditionally compiled code slightly so it works as the
original author likely intended.

Change-Id: Id6c0e94dc65b7928324a5f0bad7eba6eb2f464b9
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
11 years agoARM: remove dummy entries from .so init_array/fini_array
Ard Biesheuvel [Tue, 28 Aug 2012 07:06:07 +0000 (09:06 +0200)]
ARM: remove dummy entries from .so init_array/fini_array

The runtime linker parses the ELF section headers to
discover the size of the init_array and fini_array, so
there is no point in putting NULL terminators at the end.

Change-Id: I3246cd585efce9314155600277dd829e9f37d04f
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
11 years agoMerge "Allow linker to compile with -DLINKER_DEBUG=1"
Nick Kralevich [Mon, 27 Aug 2012 23:00:50 +0000 (16:00 -0700)]
Merge "Allow linker to compile with -DLINKER_DEBUG=1"

11 years agoMerge "Added missing cache failed notification"
Elliott Hughes [Mon, 27 Aug 2012 22:00:51 +0000 (15:00 -0700)]
Merge "Added missing cache failed notification"

11 years agoAllow linker to compile with -DLINKER_DEBUG=1
Nick Kralevich [Fri, 24 Aug 2012 20:40:25 +0000 (13:40 -0700)]
Allow linker to compile with -DLINKER_DEBUG=1

Change-Id: I27e734048cbcb9ed936369115582b3c734de1280

11 years agoMerge "Add missing va_end() to prevent stack corruptions"
Ian Rogers [Fri, 24 Aug 2012 22:10:07 +0000 (15:10 -0700)]
Merge "Add missing va_end() to prevent stack corruptions"

11 years agolibc: remove ctors/dtors sections
Ard Biesheuvel [Tue, 21 Aug 2012 12:47:58 +0000 (14:47 +0200)]
libc: remove ctors/dtors sections

None of the supported ARCHs actually populate these sections,
so there is no point in keeping them in the binaries.

Change-Id: I21a364f510118ac1114e1b49c53ec8c895c6bc6b
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
11 years agoMerge "hardening: remove pointless ARM __get_pc() function"
Nick Kralevich [Wed, 22 Aug 2012 18:41:53 +0000 (11:41 -0700)]
Merge "hardening: remove pointless ARM __get_pc() function"

11 years agohardening: remove pointless ARM __get_pc() function
Ard Biesheuvel [Wed, 22 Aug 2012 08:37:08 +0000 (10:37 +0200)]
hardening: remove pointless ARM __get_pc() function

Useful if you're trying to defeat ASLR, otherwise not
so much ...

Change-Id: I17ebb50bb490a3967db9c3038f049adafe2b8ea7
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
11 years agoMerge "Use unambiguous mnemonics"
Jean-Baptiste Queru [Wed, 22 Aug 2012 14:18:49 +0000 (07:18 -0700)]
Merge "Use unambiguous mnemonics"

11 years agoUse unambiguous mnemonics
Kevin Schoedel [Fri, 29 Jun 2012 13:23:47 +0000 (09:23 -0400)]
Use unambiguous mnemonics

Change-Id: I8da0af54cc3cbf69d9e485eb71bc44a6976b1adc
Author: Kevin P Schoedel <kevin.p.schoedel@intel.com>
Reviewed-by: Edwin Vane <edwin.vane@intel.com>
11 years agoARM: make sure __on_dlclose() actually gets called
Ard Biesheuvel [Tue, 21 Aug 2012 09:34:46 +0000 (11:34 +0200)]
ARM: make sure __on_dlclose() actually gets called

Change-Id: I280e5428b0543cccf17ca36baee4865395928cdb
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
11 years agoMerge "Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS"
Andrew Hsieh [Tue, 21 Aug 2012 10:25:45 +0000 (03:25 -0700)]
Merge "Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS"

11 years agoEnclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS
Andrew Hsieh [Tue, 21 Aug 2012 07:41:34 +0000 (15:41 +0800)]
Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS

Those are C funcitons

Related CL: https://android-review.googlesource.com/#/c/41833/

Change-Id: I4386bcf948ad31c3690c9b7a145103088133d041

11 years agoMerge "Restore posix_memalign"
Ian Rogers [Tue, 21 Aug 2012 02:35:25 +0000 (19:35 -0700)]
Merge "Restore posix_memalign"

11 years agoRestore posix_memalign
Brian Carlstrom [Tue, 21 Aug 2012 01:28:20 +0000 (18:28 -0700)]
Restore posix_memalign

Change-Id: I24e31bcb8b1d8be9375852e76964f09becd11938

11 years agoMerge "Upgrade to dlmalloc 2.8.5."
Brian Carlstrom [Mon, 20 Aug 2012 23:12:32 +0000 (16:12 -0700)]
Merge "Upgrade to dlmalloc 2.8.5."

11 years agoUpgrade to dlmalloc 2.8.5.
Ian Rogers [Sat, 18 Aug 2012 00:28:15 +0000 (17:28 -0700)]
Upgrade to dlmalloc 2.8.5.

Move dlmalloc code to upstream-dlmalloc to make pulling upstream changes
easier.
Declare pvalloc and malloc_usable_size routines present in malloc.h but with
missing implementations. Remove other functions from malloc.h that have
no implementation nor use in Android.

Change-Id: Ia6472ec6cbebc9ad1ef99f4669de9d33fcc2efb4

11 years agoMerge "Always define the 64-bit int types."
Elliott Hughes [Fri, 17 Aug 2012 23:48:14 +0000 (16:48 -0700)]
Merge "Always define the 64-bit int types."

11 years agoMerge "Fix race condition in pthread_create()"
Elliott Hughes [Fri, 17 Aug 2012 23:19:56 +0000 (16:19 -0700)]
Merge "Fix race condition in pthread_create()"

11 years agoFix race condition in pthread_create()
Jurijs Oniscuks [Thu, 5 Jul 2012 12:57:38 +0000 (14:57 +0200)]
Fix race condition in pthread_create()

Save thread id to *thread_out before new
thread is allowed to run else there's a
risk that the thread has finished and
been deleted when *thread_out is assigned.

Change-Id: I6b84c61a8df06840877d4ab036f26feace3192d8

11 years agoAlways define the 64-bit int types.
Elliott Hughes [Fri, 17 Aug 2012 21:30:06 +0000 (14:30 -0700)]
Always define the 64-bit int types.

These preprocessor tricks have caused trouble for -std=gnu99 and -ansi, and
both netbsd's libc and glibc seem to unconditionally define these types.

Change-Id: Ib8dffa341a8ca88f80d275ba2b7f93a4c910ee32

11 years agoMerge "Add link.h for all platforms with dl_phdr_info"
Elliott Hughes [Fri, 17 Aug 2012 20:54:43 +0000 (13:54 -0700)]
Merge "Add link.h for all platforms with dl_phdr_info"

11 years agoAdd link.h for all platforms with dl_phdr_info
Pavel Chupin [Fri, 17 Aug 2012 08:53:29 +0000 (12:53 +0400)]
Add link.h for all platforms with dl_phdr_info

This header is used on bionic build and should be propagated into
sysroot on toolchain rebuild. Discussion re. this header is here:
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00936.html

It is available already in mips NDK platforms:
development/ndk/platforms/android-9/arch-mips/include/link.h

Change-Id: I39ff467cdac9f448e31c11ee3e14a6200e82ab57
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
11 years agoAdded missing cache failed notification
Henrik Engström [Wed, 20 Jun 2012 06:47:52 +0000 (08:47 +0200)]
Added missing cache failed notification

Added a missing call to _resolv_cache_query_failed for another fail
case where it was missing (it doesn't go through the error handling
under the "fail" label). This missing notification caused requests to
have to wait for timeout instead of beeing notified on some failed
requests.

Change-Id: I904d60269c59b926784e3a397d2a860329f55142

11 years agoMerge "Don't over-generalize makefiles. Host modules always build. This isn't needed...
Joe Onorato [Fri, 17 Aug 2012 06:37:49 +0000 (23:37 -0700)]
Merge "Don't over-generalize makefiles.  Host modules always build. This isn't needed on eng builds."

11 years agoDon't over-generalize makefiles. Host modules always build. This isn't needed on...
Joe Onorato [Thu, 16 Aug 2012 03:27:04 +0000 (20:27 -0700)]
Don't over-generalize makefiles.  Host modules always build. This isn't needed on eng builds.

Change-Id: I5821ced7a8a9042fd2094204e07470d8002263ca

11 years agoMerge "Enhance getcwd(3) to handle NULL like glibc."
Elliott Hughes [Thu, 16 Aug 2012 23:58:34 +0000 (16:58 -0700)]
Merge "Enhance getcwd(3) to handle NULL like glibc."

11 years agoEnhance getcwd(3) to handle NULL like glibc.
Elliott Hughes [Thu, 16 Aug 2012 22:59:12 +0000 (15:59 -0700)]
Enhance getcwd(3) to handle NULL like glibc.

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

11 years agoMerge "bionic: add macro protection for MALLOC_ALIGNMENT"
Elliott Hughes [Thu, 16 Aug 2012 19:09:13 +0000 (12:09 -0700)]
Merge "bionic: add macro protection for MALLOC_ALIGNMENT"

11 years agobionic: add macro protection for MALLOC_ALIGNMENT
Jin Wei [Wed, 1 Aug 2012 06:48:57 +0000 (14:48 +0800)]
bionic: add macro protection for MALLOC_ALIGNMENT

In previous commit: 2fd81ef7, .mk file has been modified to
configure MALLOC_ALIGNMENT dynamicly according to board config.
Add the missing macor protection here.

Change-Id: I703cca2ce0504ab3e11aab226b2c61fcc0c6afa1
Author: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
11 years agoMerge "enable clone system call for x86"
Elliott Hughes [Thu, 16 Aug 2012 00:05:47 +0000 (17:05 -0700)]
Merge "enable clone system call for x86"

11 years agoenable clone system call for x86
Jin Wei [Wed, 8 Aug 2012 07:15:16 +0000 (15:15 +0800)]
enable clone system call for x86

Add __bionic_clone function for x86, which will be
used for clone system call.

Change-Id: I889dc9bf4b7ebb4358476e17e6f3233e26491f4d
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 51414

11 years agoMerge "Fix comment typos."
Elliott Hughes [Wed, 15 Aug 2012 23:59:21 +0000 (16:59 -0700)]
Merge "Fix comment typos."

11 years agoFix comment typos.
Elliott Hughes [Wed, 15 Aug 2012 23:56:00 +0000 (16:56 -0700)]
Fix comment typos.

Change-Id: I8feeec1ee9935a6d6baebe57f1c0043ff90ff94f

11 years agoMerge "Regenerate all NOTICE files with the latest version of the script."
Elliott Hughes [Wed, 15 Aug 2012 23:51:56 +0000 (16:51 -0700)]
Merge "Regenerate all NOTICE files with the latest version of the script."

11 years agoRegenerate all NOTICE files with the latest version of the script.
Elliott Hughes [Wed, 15 Aug 2012 22:43:13 +0000 (15:43 -0700)]
Regenerate all NOTICE files with the latest version of the script.

This sorts every entry, so we should have more stability and fewer
merge conflicts in future.

Change-Id: Ifc5347dc53352da22c82d41ca59b483966fcfc6b

11 years agoMerge "Switch to the current NetBSD regex implementation."
Elliott Hughes [Wed, 15 Aug 2012 22:39:49 +0000 (15:39 -0700)]
Merge "Switch to the current NetBSD regex implementation."

11 years agoSwitch to the current NetBSD regex implementation.
Elliott Hughes [Tue, 14 Aug 2012 22:32:42 +0000 (15:32 -0700)]
Switch to the current NetBSD regex implementation.

Change-Id: If32b28dd85d6a7ab8957ab81d19fa4c0de9499d5

11 years agoMerge "Sort NOTICE entries."
Elliott Hughes [Tue, 14 Aug 2012 22:31:17 +0000 (15:31 -0700)]
Merge "Sort NOTICE entries."

11 years agoSort NOTICE entries.
Elliott Hughes [Tue, 14 Aug 2012 22:04:05 +0000 (15:04 -0700)]
Sort NOTICE entries.

Also make sure we get the whole of any copyright header, in case
there's text before the "Copyright" line.

Change-Id: Iabcc5e0931a39c0107b833539fec7c5a3d134592

11 years agoMerge "More cleanup."
Elliott Hughes [Tue, 14 Aug 2012 22:02:40 +0000 (15:02 -0700)]
Merge "More cleanup."

11 years agoMore cleanup.
Elliott Hughes [Tue, 14 Aug 2012 21:07:59 +0000 (14:07 -0700)]
More cleanup.

Make more stuff static, remove some dead code, and fix a few typos.

Change-Id: I010b0eadeaf61e2899c37014ad1e7082c70bd510

11 years agoMerge "Update MS_ mount flags, define unshare() syscall."
Elliott Hughes [Tue, 14 Aug 2012 19:14:29 +0000 (12:14 -0700)]
Merge "Update MS_ mount flags, define unshare() syscall."

11 years agoUpdate MS_ mount flags, define unshare() syscall.
Jeff Sharkey [Sat, 11 Aug 2012 21:12:26 +0000 (14:12 -0700)]
Update MS_ mount flags, define unshare() syscall.

(cherry-pick of 82393decdfc6b0383054fb5d2f54725bbee88b8c.)

Bug: 6925012
Change-Id: I4f962d8975ad62ff4b9983150f9e481796092b9d

11 years agoMerge "linker: avoid clobbering the .dynamic section of shared libs"
Elliott Hughes [Tue, 14 Aug 2012 19:07:17 +0000 (12:07 -0700)]
Merge "linker: avoid clobbering the .dynamic section of shared libs"

11 years agoMerge "Switch to upstream NetBSD tdelete/tfind/tsearch."
Elliott Hughes [Tue, 14 Aug 2012 18:56:29 +0000 (11:56 -0700)]
Merge "Switch to upstream NetBSD tdelete/tfind/tsearch."