Commit graph

344 commits

Author SHA1 Message Date
Colin Cross
146d79c22a am fbec57d4: Merge changes Ib496e818,I074204e9
* commit 'fbec57d46c42460b2381484d1610ff21922d162e':
  bionic: add compatibility mode for properties
  bionic: use the size of the file to determine property area size
2013-06-25 17:08:48 -07:00
Colin Cross
5e9a086145 bionic: add compatibility mode for properties
Allow a new bionic to work with an old init property area by supporting
the old format.

(cherry picked from commit ad76c85b9c)

Change-Id: Ib496e818a62a5834d40c71eb4745783d998be893
2013-06-25 16:52:40 -07:00
Elliott Hughes
db6dd600d2 am b116bf76: Merge "Switch to current upstream getopt_long."
* commit 'b116bf76286178a7d552c4d0a72b79212c8c93d1':
  Switch to current upstream getopt_long.
2013-06-25 15:58:53 -07:00
Elliott Hughes
d278b828fe Switch to current upstream getopt_long.
Change-Id: I4c646dcb8be9e88dd54d069a03bbc5fbfd92de03
2013-06-25 14:56:17 -07:00
Elliott Hughes
5f4d2df2fc am 55189a0f: Merge "Switch to current upstream stdio makebuf.c and setvbuf.c."
* commit '55189a0fbd26cfd84939d9d3a42a1800a63bd2c5':
  Switch to current upstream stdio makebuf.c and setvbuf.c.
2013-06-12 15:58:41 -07:00
Elliott Hughes
677ee56477 Switch to current upstream stdio makebuf.c and setvbuf.c.
Change-Id: I4761b5e94459815520f01062eef39abf62af621f
2013-06-12 15:24:15 -07:00
Elliott Hughes
3da47942d3 am 944ea1a3: Merge "Clean up abort."
* commit '944ea1a32018c44d6cb55c9454e670b0e152da6d':
  Clean up abort.
2013-06-12 14:58:32 -07:00
Elliott Hughes
61e699a133 Clean up abort.
* A dlmalloc usage error shouldn't call abort(3) because we want to
  cause a SIGSEGV by writing the address dlmalloc didn't like to an
  address the kernel won't like, so that debuggerd will dump the
  memory around the address that upset dlmalloc.

* Switch to the simpler FreeBSD/NetBSD style of registering stdio
  cleanup. Hopefully this will let us simplify more of the stdio
  implementation.

* Clear the stdio cleanup handler before we abort because of a dlmalloc
  corruption error. This fixes the reported bug, where we'd hang inside
  dlmalloc because the stdio cleanup reentered dlmalloc.

Bug: 9301265
Change-Id: Ief31b389455d6876e5a68f0f5429567d37277dbc
2013-06-12 14:14:53 -07:00
Elliott Hughes
6bcf71c9ac am 2fbc9dda: Merge "bionic/x86: Optimization for string routines"
* commit '2fbc9dda345486005569be4ec586c6aae9d51650':
  bionic/x86: Optimization for string routines
2013-06-07 17:47:33 -07:00
Liubov Dmitrieva
0a490665a3 bionic/x86: Optimization for string routines
Optimized strcpy, strcat,
strncpy, strncat, strlcpy, strlcat,
memchr, memrchr, strchr, strrchr, index,
strnlen, strlen, wcslen, wmemcmp, wcscmp,
wcschr, wcsrchr, wcscpy, wcscat

Change-Id: I82b29132edf9a2e144e0bb3ee4ff5217df8d2a6d
Signed-off-by: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
2013-05-31 13:37:03 +04:00
Nick Kralevich
4f614a7036 am e4ac8feb: Merge "libc: cleanup strchr"
* commit 'e4ac8feb58ed1f963db9a1f32fa74a06a1f594f2':
  libc: cleanup strchr
2013-05-02 14:25:42 -07:00
Nick Kralevich
4f40e511b0 libc: cleanup strchr
Move strchr to a .cpp file, and change to bionic directory.

Change-Id: I64ade7df326c0a9a714aca4caf5647b6833b1c97
2013-05-02 13:58:03 -07:00
Elliott Hughes
cf4a53020d am b3c8c4d8: Merge "Switch to current FreeBSD qsort."
* commit 'b3c8c4d8654894cdc72d32bde84a520ccda4d8f3':
  Switch to current FreeBSD qsort.
2013-04-12 12:30:22 -07:00
Elliott Hughes
0b25f633a2 Switch to current FreeBSD qsort.
Change-Id: Ic46cd0b663dc5fa78c99dd38db0bfe849a25e789
2013-04-11 18:08:34 -07:00
Elliott Hughes
5fe62e50f6 am ed36d95f: Merge "Start moving to current FreeBSD stdio."
* commit 'ed36d95fac5881f78a601e2932f51edfd27c6ba6':
  Start moving to current FreeBSD stdio.
2013-04-11 14:24:37 -07:00
Elliott Hughes
6b05c8e280 Start moving to current FreeBSD stdio.
This only touches the easy stuff.

Change-Id: Iecee57f1681dba5c56bff59f0e9a89811a71f0ca
2013-04-11 13:55:01 -07:00
Elliott Hughes
76db50ddc9 am b632857a: Merge "Add missing include and function prototype for sched_getaffinity."
* commit 'b632857a50a1fd2b759316d07ace6c36f6f418cf':
  Add missing include and function prototype for sched_getaffinity.
2013-04-10 17:56:22 -07:00
Kito Cheng
4ca685e36e Add missing include and function prototype for sched_getaffinity.
Change-Id: I649633c8d074def5d05bd0c8b92fb680d9d11d51
2013-04-10 17:44:29 -07:00
Kito Cheng
9b84824dfd Prevent name conflict for eventfd.cpp and eventfd.s when building libc.a
- eventfd.cpp and eventfd.s will output to the same file when building libc.a
   out/target/product/*/obj/STATIC_LIBRARIES/libc_intermediates/WHOLE/libc_common_objs/eventfd.o
 - And then `eventfd` will undefined when statically linked to libc.

Also add a unit test.

(cherry-pick of 8baa929d5d3bcf63381cf78ba76168c80c303f5e.)

Change-Id: Icd0eb0f4ce0511fb9ec00a504d491afd47d744d3
2013-04-03 11:14:20 -07:00
Kito Cheng
8baa929d5d Prevent name conflict for eventfd.cpp and eventfd.s when building libc.a
- eventfd.cpp and eventfd.s will output to the same file when building libc.a
   out/target/product/*/obj/STATIC_LIBRARIES/libc_intermediates/WHOLE/libc_common_objs/eventfd.o
 - And then `eventfd` will undefined when statically linked to libc.

Also add a unit test.

Change-Id: Ib310ade3256712ca617a90539e8eb07459c98505
2013-04-03 11:10:37 -07:00
Elliott Hughes
b826ebf41e am 85598626: am 34895c1b: Merge "Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>."
* commit '85598626f4ca7914d996371ce0471ab154aa7585':
  Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>.
2013-03-22 11:11:34 -07:00
Elliott Hughes
8794ece296 Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>.
For some reason, socketcalls.c was only being compiled for ARM, where
it makes no sense. For x86 we generate stubs for the socket functions
that use __NR_socketcall directly.

Change-Id: I84181e6183fae2314ae3ed862276eba82ad21e8e
2013-03-21 23:07:11 -07:00
Elliott Hughes
c9edc07977 am 39e2a408: am 6eb978c9: Merge "Expose wait4 as wait4 rather than __wait4."
* commit '39e2a408a64bd24fb0fe7f5eb444b55af1160480':
  Expose wait4 as wait4 rather than __wait4.
2013-03-21 16:19:29 -07:00
Elliott Hughes
17a8b0db63 Expose wait4 as wait4 rather than __wait4.
This helps strace(1) compile with one fewer hack.

Change-Id: I5296d0cfec5546709cda990abd705ad33d7c4626
2013-03-21 16:14:06 -07:00
Elliott Hughes
12ea800566 am 5f829205: am c1416647: Merge "Clean up internal libc logging."
* commit '5f8292050fc07f4bf9e70f37a807ad028e3cfc87':
  Clean up internal libc logging.
2013-03-15 16:36:37 -07:00
Elliott Hughes
8f2a5a0b40 Clean up internal libc logging.
We only need one logging API, and I prefer the one that does no
allocation and is thus safe to use in any context.

Also use O_CLOEXEC when opening the /dev/log files.

Move everything logging-related into one header file.

Change-Id: Ic1e3ea8e9b910dc29df351bff6c0aa4db26fbb58
2013-03-15 16:12:58 -07:00
Christopher Ferris
306a353825 Remove unused arm defines.
The defines HAVE_32_BYTE_CACHE_LINES and ARCH_ARM_USE_NON_NEON_MEMCPY
are not used by any code. The previous memcpy code that used these
has been split into different architecture versions to avoid the need
for them.

Bug: 8005082

Merge from internal master.

(cherry-picked from commit 6e1a5cf31b)

Change-Id: Ib18fc3f4131b21cdbd19b9dde7697ac25d066fcf
2013-03-14 15:32:18 -07:00
Christopher Ferris
04954a43b3 Break bionic implementations into arch versions.
Move arch specific code for arm, mips, x86 into separate
makefiles.
In addition, add different arm cpu versions of memcpy/memset.

Bug: 8005082

Merge from internal master (acdde8c1cf).

Change-Id: I04f3d0715104fab618e1abf7cf8f7eec9bec79df
2013-03-12 14:06:08 -07:00
Elliott Hughes
0a2ee4750a am ad7c275e: am c9f80814: Merge "Upgrade to current NetBSD popen/pclose."
* commit 'ad7c275e45088e1f13656b97dabbe911fff83664':
  Upgrade to current NetBSD popen/pclose.
2013-03-07 01:04:52 +00:00
Elliott Hughes
6b3f49a537 Upgrade to current NetBSD popen/pclose.
This gets us back to using vfork now our ARM vfork assembler stub is
fixed, and adds the missing thread safety for the 'pidlist'.

Bug: 5335385
Change-Id: Ib08bfa65b2cb9fa695717aae629ea14816bf988d
2013-03-06 16:20:55 -08:00
Elliott Hughes
9c0c056bed am 6b1aa1b1: am db794197: Merge "Fix debug malloc."
* commit '6b1aa1b16bc2cf8ba17e33fca4ffc399368b356c':
  Fix debug malloc.
2013-03-06 23:24:59 +00:00
Elliott Hughes
642331b5dd Fix debug malloc.
This was broken by the change to use AT_RANDOM for the stack guards.

Bug: 7959813
Bug: 8330764
Change-Id: I791900092b72a9a900f16585237fa7ad82aaed9f
2013-03-06 15:03:53 -08:00
Elliott Hughes
c96ad9bcd2 am 7b69ac53: am cf9a9604: Merge "Switch to upstream-freebsd for the unmolested wchar code."
* commit '7b69ac535abca0e7867524e68f5a3581cc367de8':
  Switch to upstream-freebsd for the unmolested wchar code.
2013-03-05 20:28:28 +00:00
Elliott Hughes
81e0f35acc am 2125c155: am d392e044: Merge "Move realpath.c to upstream-freebsd."
* commit '2125c15506cbe9e4062d72ebb723d164e9c01c1f':
  Move realpath.c to upstream-freebsd.
2013-03-04 23:56:56 +00:00
Elliott Hughes
eb93ebffba Switch to upstream-freebsd for the unmolested wchar code.
Change-Id: I87b4d76ff8da04109ae53638eec4f11629798960
2013-03-01 18:35:56 -08:00
Elliott Hughes
f0777843c0 Move realpath.c to upstream-freebsd.
This is actually a slightly newer upstream version than the one I
originally pulled. Hopefully now it's in upstream-freebsd it will
be easier to track upstream, though I still need to sit down and
write the necessary scripts at some point.

Bug: 5110679
Change-Id: I87e563f0f95aa8e68b45578e2a8f448bbf827a33
2013-03-01 17:11:39 -08:00
Christopher Ferris
947b3ab02b Remove unused arm defines. DO NOT MERGE
The defines HAVE_32_BYTE_CACHE_LINES and ARCH_ARM_USE_NON_NEON_MEMCPY
are not used by any code. The previous memcpy code that used these
has been split into different architecture versions to avoid the need
for them.

Bug: 8005082

(cherry picked from commit 6e1a5cf31b)

Change-Id: I69654d47db1458136782b5504290f620e924ee75
2013-03-01 16:54:56 -08:00
Christopher Ferris
7c83a1ed81 Break bionic implementations into arch versions. DO NOT MERGE
Move arch specific code for arm, mips, x86 into separate
makefiles.
In addition, add different arm cpu versions of memcpy/memset.

Bug: 8005082

(cherry picked from commit acdde8c1cf)

Change-Id: I0108d432af9f6283ae99adfc92a3399e5ab3e31d
2013-02-28 17:45:16 -08:00
Elliott Hughes
aa13eaa934 am d9cb6988: am 406968b2: am c0e9ddd0: Merge "Reimplement scandir(3)."
* commit 'd9cb69881a062c615a8009be0a70270c70eb35da':
  Reimplement scandir(3).
2013-02-25 22:58:44 +00:00
Elliott Hughes
701bec2af3 Reimplement scandir(3).
The old scandir implementation didn't take into account the varying
size of directory entries, and didn't correctly clean up on its
error exits.

Bug: 7339844
Change-Id: Ib40e3564709752241a3119a496cbb2192e3f9abe
2013-02-25 13:14:31 -08:00
Elliott Hughes
5593d50c72 am eeecff72: Merge "Fix pthreads functions that should return ESRCH."
* commit 'eeecff7293efd6becf3b07b8d24cada3d820c894':
  Fix pthreads functions that should return ESRCH.
2013-02-19 13:46:37 -08:00
Elliott Hughes
9d23e04c43 Fix pthreads functions that should return ESRCH.
imgtec pointed out that pthread_kill(3) was broken, but most of the
other functions that ought to return ESRCH for invalid/exited threads
were equally broken.

Change-Id: I96347f6195549aee0c72dc39063e6c5d06d2e01f
2013-02-19 12:21:41 -08:00
Elliott Hughes
4174337525 am 7f67f78a: Merge "dalvik is big enough and ugly enough to handle System.arraycopy itself."
* commit '7f67f78ad5c3da689997edd8fbb5afb6e5fc6355':
  dalvik is big enough and ugly enough to handle System.arraycopy itself.
2013-02-15 17:00:58 -08:00
Elliott Hughes
081318e355 dalvik is big enough and ugly enough to handle System.arraycopy itself.
Change-Id: I4b54a15ea101c0c6bab06cfb11e4178f5a57fc05
2013-02-15 14:27:52 -08:00
Elliott Hughes
56a007c157 am 0a2cb815: Merge "Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '0a2cb815974ea96af664fa966079966a08916722':
  Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces.
2013-02-14 15:59:15 -08:00
Elliott Hughes
fb7eb5e07f Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces.
Bug: 2487269
Change-Id: Iec5e470fc22cd9108404f634a9d4baa2c7b7f58f
2013-02-14 14:37:34 -08:00
Elliott Hughes
7331af73f2 am c2d26ce7: Merge "Turn on -Werror for ssp.cpp."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'c2d26ce7452e69b9492cd28b7c0271866798658b':
  Turn on -Werror for ssp.cpp.
2013-02-14 11:23:48 -08:00
Elliott Hughes
dc5ec07158 Turn on -Werror for ssp.cpp.
libc_bionic.a is already compiled -Werror, but this one file gets
compiled into its own library because it needs to be compiled with
-fno-stack-protector.

Change-Id: I273c535ab5c73ccaccbcf793fda1f788a2589abe
2013-02-14 11:15:58 -08:00
Elliott Hughes
2346559cb4 am 6b97c7dc: Merge "ffs was not being built for x86."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '6b97c7dc0376577276abbdacc52e5cc11cf8a7fd':
  ffs was not being built for x86.
2013-02-13 17:08:07 -08:00
Elliott Hughes
d2547040a1 ffs was not being built for x86.
Change-Id: I53e92273664a4d0a13536c2fa1aeb87e1f3cf4e8
2013-02-13 16:31:52 -08:00