android-sdk/platform-bionic.git
8 years agoMerge "bionic: move benchmarks out of tests directory"
Colin Cross [Wed, 11 Dec 2013 19:05:24 +0000 (19:05 +0000)]
Merge "bionic: move benchmarks out of tests directory"

8 years agobionic: move benchmarks out of tests directory
Colin Cross [Sat, 16 Nov 2013 01:49:47 +0000 (17:49 -0800)]
bionic: move benchmarks out of tests directory

Change-Id: I4d054965198af22c9a9c821d1bc53f4e9ea01248

8 years agoMerge "Do not clear tids on detached threads."
Christopher Ferris [Sat, 7 Dec 2013 16:38:08 +0000 (16:38 +0000)]
Merge "Do not clear tids on detached threads."

8 years agoDo not clear tids on detached threads.
Christopher Ferris [Sat, 7 Dec 2013 02:54:48 +0000 (18:54 -0800)]
Do not clear tids on detached threads.

Make sure that the kernel isn't going to try and clear the tid of
freed memory.

Bug: 11963327
Change-Id: I95d02340bfbe92f56036d2cc58dbf0e3079eb7c3

8 years agoMerge commit '04b4339ad5396690329877df10fbe568bd4dd600' into HEAD
The Android Open Source Project [Thu, 5 Dec 2013 20:37:57 +0000 (12:37 -0800)]
Merge commit '04b4339ad5396690329877df10fbe568bd4dd600' into HEAD

8 years agoMerge "Add strcmp/memcmp testing."
Christopher Ferris [Wed, 4 Dec 2013 19:08:16 +0000 (19:08 +0000)]
Merge "Add strcmp/memcmp testing."

8 years agoAdd strcmp/memcmp testing.
Christopher Ferris [Wed, 4 Dec 2013 02:39:10 +0000 (18:39 -0800)]
Add strcmp/memcmp testing.

Bug: 9797008
Change-Id: I11b1da060d29f7dacbb53f20a3e2082395b5bd8a

8 years agoMerge "Add cfi directives to all arm assembly."
Christopher Ferris [Tue, 3 Dec 2013 20:28:09 +0000 (20:28 +0000)]
Merge "Add cfi directives to all arm assembly."

8 years agoAdd cfi directives to all arm assembly.
Christopher Ferris [Tue, 3 Dec 2013 01:44:53 +0000 (17:44 -0800)]
Add cfi directives to all arm assembly.

Since the ENTRY/END macros now have .cfi_startproc/.cfi_endproc, most of the
custom arm assembly has no unwind information. Adding the proper cfi directives
for these and removing the arm directives.

Update the gensyscalls.py script to add these cfi directives for the generated
assembly. Also fix the references to non-uapi headers to the proper uapi
header.

In addition, remove the kill.S, tkill.S, tgkill.S for arm since they are not
needed at all. The unwinder (libunwind) is able to properly unwind using the
normal abort.

After this change, I can unwind through the system calls again.

Bug: 11559337
Bug: 11825869
Bug: 11321283

Change-Id: I18b48089ef2d000a67913ce6febc6544bbe934a3

8 years agoMerge "Finish <sys/user.h>."
Elliott Hughes [Wed, 27 Nov 2013 04:51:34 +0000 (04:51 +0000)]
Merge "Finish <sys/user.h>."

8 years agoFinish <sys/user.h>.
Elliott Hughes [Wed, 27 Nov 2013 01:57:31 +0000 (17:57 -0800)]
Finish <sys/user.h>.

Change-Id: I1d97d7fa3d5be2ff4728571ed5376705a27091ec

8 years agoMerge "Fix the order of arguments to sys_clone for x86."
Elliott Hughes [Wed, 27 Nov 2013 00:34:44 +0000 (00:34 +0000)]
Merge "Fix the order of arguments to sys_clone for x86."

8 years agoFix the order of arguments to sys_clone for x86.
Elliott Hughes [Wed, 27 Nov 2013 00:20:50 +0000 (16:20 -0800)]
Fix the order of arguments to sys_clone for x86.

Unlike x86-64, x86's arguments are just like every other
architecture's.

Change-Id: Ic6da23f2a70599683b68e7e12ab9ba061e0b349c

8 years agoMerge "Work around CLONE_SETTLS being weird on x86."
Elliott Hughes [Tue, 26 Nov 2013 22:36:38 +0000 (22:36 +0000)]
Merge "Work around CLONE_SETTLS being weird on x86."

8 years agoWork around CLONE_SETTLS being weird on x86.
Elliott Hughes [Tue, 26 Nov 2013 21:57:21 +0000 (13:57 -0800)]
Work around CLONE_SETTLS being weird on x86.

Unlike other architectures, on x86 (but not x86-64), CLONE_SETTLS
takes a pointer to a struct user_desc instead of a pointer to the
TLS itself. Rather than have to deal with this here, let's just use
the old __set_tls mechanism we used to use (and still use for the
main thread on all architectures, so it's not going away any time
soon).

Bug: 11826724
Change-Id: I02a27939a73ae6cea1134a3f4c1dd7eafea479da

8 years agoMerge "Fix _exit_with_stack_teardown for x86."
Elliott Hughes [Tue, 26 Nov 2013 21:51:48 +0000 (21:51 +0000)]
Merge "Fix _exit_with_stack_teardown for x86."

8 years agoFix _exit_with_stack_teardown for x86.
Elliott Hughes [Tue, 26 Nov 2013 21:48:24 +0000 (13:48 -0800)]
Fix _exit_with_stack_teardown for x86.

Change-Id: Ife8f9c538c86f7c0017143015d5ee849a99b625b

8 years agoMerge "Make <sys/timerfd.h> standalone."
Elliott Hughes [Mon, 25 Nov 2013 22:00:10 +0000 (22:00 +0000)]
Merge "Make <sys/timerfd.h> standalone."

8 years agoMake <sys/timerfd.h> standalone.
Elliott Hughes [Mon, 25 Nov 2013 21:58:38 +0000 (13:58 -0800)]
Make <sys/timerfd.h> standalone.

There's no uapi timerfd.h.

Bug: 11559337
Change-Id: I77a4b1365fdcf2c9f18673b11341a165e54b4bbd

8 years agoMerge "Regenerate the bionic kernel headers to match external/kernel-headers."
Elliott Hughes [Mon, 25 Nov 2013 21:56:09 +0000 (21:56 +0000)]
Merge "Regenerate the bionic kernel headers to match external/kernel-headers."

8 years agoRegenerate the bionic kernel headers to match external/kernel-headers.
Elliott Hughes [Mon, 25 Nov 2013 21:50:24 +0000 (13:50 -0800)]
Regenerate the bionic kernel headers to match external/kernel-headers.

Bug: 11859767
Change-Id: I3d746188a1c4bdf8db1358521438435d3e63dbac

8 years agoam 14d6be45: Merge "Delete non-uapi headers."
Christopher Ferris [Sun, 24 Nov 2013 08:20:23 +0000 (00:20 -0800)]
am 14d6be45: Merge "Delete non-uapi headers."

* commit '14d6be45b960f8fbb039bd946e22ce406e8b65c3':
  Delete non-uapi headers.

8 years agoMerge "Delete non-uapi headers."
Christopher Ferris [Sun, 24 Nov 2013 08:16:25 +0000 (08:16 +0000)]
Merge "Delete non-uapi headers."

8 years agoam 985c3fbb: Merge "Move arm user.h definitions to sys/user.h."
Christopher Ferris [Sat, 23 Nov 2013 16:02:04 +0000 (08:02 -0800)]
am 985c3fbb: Merge "Move arm user.h definitions to sys/user.h."

* commit '985c3fbb3b1dabfa799e2a8c102867349bcb5a76':
  Move arm user.h definitions to sys/user.h.

8 years agoDelete non-uapi headers.
Christopher Ferris [Sat, 23 Nov 2013 01:57:59 +0000 (17:57 -0800)]
Delete non-uapi headers.

Update headers and delete non-uapi headers that have been removed from
external/kernel-headers project.

Change-Id: I9ed9632a941095fe1bf3b207bafe1151f00de033

8 years agoMerge "Move arm user.h definitions to sys/user.h."
Christopher Ferris [Sat, 23 Nov 2013 15:59:57 +0000 (15:59 +0000)]
Merge "Move arm user.h definitions to sys/user.h."

8 years agoMove arm user.h definitions to sys/user.h.
Christopher Ferris [Sat, 23 Nov 2013 02:00:09 +0000 (18:00 -0800)]
Move arm user.h definitions to sys/user.h.

There is no uapi user.h file for arm, it was included by accident.
Move the user struct definition into the file to follow the pattern
used by the other architectures.

Change-Id: Ib9cea0deca551c9268382ddd6de9202fd32ef941

8 years agoam 507f95e2: Merge "Update script to copy in extra generated files."
Christopher Ferris [Sat, 23 Nov 2013 01:22:10 +0000 (17:22 -0800)]
am 507f95e2: Merge "Update script to copy in extra generated files."

* commit '507f95e22b39fb58b9ffbba38ab593475b926af5':
  Update script to copy in extra generated files.

8 years agoMerge "Update script to copy in extra generated files."
Christopher Ferris [Sat, 23 Nov 2013 01:17:15 +0000 (01:17 +0000)]
Merge "Update script to copy in extra generated files."

8 years agoUpdate script to copy in extra generated files.
Christopher Ferris [Sat, 23 Nov 2013 01:04:34 +0000 (17:04 -0800)]
Update script to copy in extra generated files.

There are files in generated/asm that simply include asm-generic files. The
script now copies any file in generated/asm that also exists in asm-generic.

Change-Id: I075161c68624e9e9e81797224831988ce02220eb

8 years agoMerge commit '811b0cdb2d6e4a697dbc63a678712759dd0db242' into HEAD
The Android Open Source Project [Fri, 22 Nov 2013 19:08:12 +0000 (11:08 -0800)]
Merge commit '811b0cdb2d6e4a697dbc63a678712759dd0db242' into HEAD

Change-Id: I786944f80fb1a2d502fed51dc2c391ed5db66761

8 years agoam 26f0e54a: Merge "Script to grab uapi headers from android kernel."
Christopher Ferris [Thu, 21 Nov 2013 22:22:49 +0000 (14:22 -0800)]
am 26f0e54a: Merge "Script to grab uapi headers from android kernel."

* commit '26f0e54ae083727ee66ee35531ed00338570d792':
  Script to grab uapi headers from android kernel.

8 years agoMerge "Script to grab uapi headers from android kernel."
Christopher Ferris [Thu, 21 Nov 2013 22:20:14 +0000 (22:20 +0000)]
Merge "Script to grab uapi headers from android kernel."

8 years agoam fa7b48bf: Merge "Regenerate uapi header files."
Elliott Hughes [Thu, 21 Nov 2013 22:11:39 +0000 (14:11 -0800)]
am fa7b48bf: Merge "Regenerate uapi header files."

* commit 'fa7b48bf8753690bd15706a1fe3d23cf5c42782f':
  Regenerate uapi header files.

8 years agoScript to grab uapi headers from android kernel.
Christopher Ferris [Thu, 21 Nov 2013 03:52:56 +0000 (19:52 -0800)]
Script to grab uapi headers from android kernel.

Change-Id: Ia140e3ab27fbfee6b02f04c085f3e0e351bbe68d

8 years agoMerge "Regenerate uapi header files."
Elliott Hughes [Thu, 21 Nov 2013 22:06:14 +0000 (22:06 +0000)]
Merge "Regenerate uapi header files."

8 years agoRegenerate uapi header files.
Elliott Hughes [Thu, 21 Nov 2013 21:43:23 +0000 (13:43 -0800)]
Regenerate uapi header files.

Change-Id: Idc934ed8ae17aba3300e4022e9b42177b0907e9d

8 years agoam 880d0e6c: Merge "Remove hidden __reboot from header"
Elliott Hughes [Thu, 21 Nov 2013 20:41:56 +0000 (12:41 -0800)]
am 880d0e6c: Merge "Remove hidden __reboot from header"

* commit '880d0e6c64eb49736125648d1539726629308316':
  Remove hidden __reboot from header

8 years agoMerge "Remove hidden __reboot from header"
Elliott Hughes [Thu, 21 Nov 2013 20:37:25 +0000 (20:37 +0000)]
Merge "Remove hidden __reboot from header"

8 years agoRemove hidden __reboot from header
Pavel Chupin [Thu, 21 Nov 2013 19:13:08 +0000 (23:13 +0400)]
Remove hidden __reboot from header

This change is required:
https://android-review.googlesource.com/#/c/70570

Change-Id: Idb991f96a424aa5b0f9e06d9fb787fe8c8530750
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
8 years agoam eec57b37: Merge "Add support for the ternary operator to the header scrubber."
Elliott Hughes [Thu, 21 Nov 2013 19:34:47 +0000 (11:34 -0800)]
am eec57b37: Merge "Add support for the ternary operator to the header scrubber."

* commit 'eec57b370642f1b83285883104f2e778f32eef73':
  Add support for the ternary operator to the header scrubber.

8 years agoMerge "Add support for the ternary operator to the header scrubber."
Elliott Hughes [Thu, 21 Nov 2013 19:30:22 +0000 (19:30 +0000)]
Merge "Add support for the ternary operator to the header scrubber."

8 years agoAdd support for the ternary operator to the header scrubber.
Elliott Hughes [Thu, 21 Nov 2013 19:12:34 +0000 (11:12 -0800)]
Add support for the ternary operator to the header scrubber.

Used in various uapi headers.

Change-Id: Id0f862d2adc7ddc9727e8a29160d5435f8d547c3

8 years agoam d4143c8e: Merge "Fix useconds_t for LP64."
Elliott Hughes [Thu, 21 Nov 2013 17:07:15 +0000 (09:07 -0800)]
am d4143c8e: Merge "Fix useconds_t for LP64."

* commit 'd4143c8e4cd8b006d8f422883b53684881e0991a':
  Fix useconds_t for LP64.

8 years agoam 15a64948: Merge "Remove obsolete kernel/arch-mips headers."
Elliott Hughes [Thu, 21 Nov 2013 17:07:14 +0000 (09:07 -0800)]
am 15a64948: Merge "Remove obsolete kernel/arch-mips headers."

* commit '15a64948567e6e885f639070fa1cc56900dcbae0':
  Remove obsolete kernel/arch-mips headers.

8 years agoam b135f6e5: Merge "Remove the unused arch-x86 and arch-x86-64 kernel headers."
Elliott Hughes [Thu, 21 Nov 2013 17:07:13 +0000 (09:07 -0800)]
am b135f6e5: Merge "Remove the unused arch-x86 and arch-x86-64 kernel headers."

* commit 'b135f6e58cc81a6de64c55017d25496003ebe547':
  Remove the unused arch-x86 and arch-x86-64 kernel headers.

8 years agoMerge "Fix useconds_t for LP64."
Elliott Hughes [Thu, 21 Nov 2013 17:05:04 +0000 (17:05 +0000)]
Merge "Fix useconds_t for LP64."

8 years agoMerge "Remove obsolete kernel/arch-mips headers."
Elliott Hughes [Thu, 21 Nov 2013 17:04:44 +0000 (17:04 +0000)]
Merge "Remove obsolete kernel/arch-mips headers."

8 years agoMerge "Remove the unused arch-x86 and arch-x86-64 kernel headers."
Elliott Hughes [Thu, 21 Nov 2013 17:04:24 +0000 (17:04 +0000)]
Merge "Remove the unused arch-x86 and arch-x86-64 kernel headers."

8 years agoFix useconds_t for LP64.
Elliott Hughes [Thu, 21 Nov 2013 16:55:46 +0000 (08:55 -0800)]
Fix useconds_t for LP64.

Change-Id: I869e60484999c1feda3dcdb86bee5b5373e6b3df

8 years agoRemove obsolete kernel/arch-mips headers.
Elliott Hughes [Thu, 21 Nov 2013 02:09:34 +0000 (18:09 -0800)]
Remove obsolete kernel/arch-mips headers.

Bug: 11559337
Change-Id: I70e205ff1f5acd07fddd7d82367e818b13847acd

8 years agoam ca045a19: Merge "Switch to upstream sleep(3) and usleep(3)."
Elliott Hughes [Thu, 21 Nov 2013 00:44:59 +0000 (16:44 -0800)]
am ca045a19: Merge "Switch to upstream sleep(3) and usleep(3)."

* commit 'ca045a19234a9323ea0e7eccbe3aefd74f9c1bab':
  Switch to upstream sleep(3) and usleep(3).

8 years agoMerge "Switch to upstream sleep(3) and usleep(3)."
Elliott Hughes [Thu, 21 Nov 2013 00:41:30 +0000 (00:41 +0000)]
Merge "Switch to upstream sleep(3) and usleep(3)."

8 years agoSwitch to upstream sleep(3) and usleep(3).
Elliott Hughes [Thu, 21 Nov 2013 00:09:06 +0000 (16:09 -0800)]
Switch to upstream sleep(3) and usleep(3).

Also fix the signature of usleep, and the definition of useconds_t which
should be unsigned, as the 'u' in its name implies.

This patch also cleans up the existing FreeBSD hacks by moving the libm
stuff from <sys/cdefs.h> to a libm-private header, and adding comments
about the hacks we use to build FreeBSD source.

Change-Id: Ibe5067a380502df94a0a3a7901969b35411085b6

8 years agoam 39bc7ecd: Merge "Fix <signal.h> for mips uapi."
Elliott Hughes [Wed, 20 Nov 2013 20:57:19 +0000 (12:57 -0800)]
am 39bc7ecd: Merge "Fix <signal.h> for mips uapi."

* commit '39bc7ecd45700e9edac0b29d33cc211383ebb107':
  Fix <signal.h> for mips uapi.

8 years agoMerge "Fix <signal.h> for mips uapi."
Elliott Hughes [Wed, 20 Nov 2013 20:54:03 +0000 (20:54 +0000)]
Merge "Fix <signal.h> for mips uapi."

8 years agoFix <signal.h> for mips uapi.
Elliott Hughes [Wed, 20 Nov 2013 20:51:52 +0000 (12:51 -0800)]
Fix <signal.h> for mips uapi.

Bug: 11559337
Change-Id: I4c6080f162d74ee78c81d698c7b50470b0e09586

8 years agoam db1dec1e: Merge "Clean up pthread_internal_t."
Elliott Hughes [Wed, 20 Nov 2013 01:25:54 +0000 (17:25 -0800)]
am db1dec1e: Merge "Clean up pthread_internal_t."

* commit 'db1dec1ed4fac8bdb312a53e63ba8afeb3c9dea3':
  Clean up pthread_internal_t.

8 years agoMerge "Clean up pthread_internal_t."
Elliott Hughes [Wed, 20 Nov 2013 01:23:33 +0000 (01:23 +0000)]
Merge "Clean up pthread_internal_t."

8 years agoClean up pthread_internal_t.
Elliott Hughes [Wed, 20 Nov 2013 00:52:24 +0000 (16:52 -0800)]
Clean up pthread_internal_t.

Bug: 11755300
Change-Id: Ib509e8c5ec6b23513aa78b5ac5141d7c34ce2dc8

8 years agoRemove the unused arch-x86 and arch-x86-64 kernel headers.
Elliott Hughes [Wed, 20 Nov 2013 00:56:55 +0000 (16:56 -0800)]
Remove the unused arch-x86 and arch-x86-64 kernel headers.

x86-64 already used uapi headers, and x86 can too now.

Bug: 11559337
Change-Id: I1196d2500f06ad40f2488b96fc8ccc7e02c7d5c0

8 years agoam 2a34009f: Merge "Add .cfi_startproc/.cfi_endproc to ENTRY/END."
Christopher Ferris [Wed, 20 Nov 2013 00:48:20 +0000 (16:48 -0800)]
am 2a34009f: Merge "Add .cfi_startproc/.cfi_endproc to ENTRY/END."

* commit '2a34009f109a504d3623abf75d7087a0d6474e59':
  Add .cfi_startproc/.cfi_endproc to ENTRY/END.

8 years agoMerge "Add .cfi_startproc/.cfi_endproc to ENTRY/END."
Christopher Ferris [Wed, 20 Nov 2013 00:45:24 +0000 (00:45 +0000)]
Merge "Add .cfi_startproc/.cfi_endproc to ENTRY/END."

8 years agoAdd .cfi_startproc/.cfi_endproc to ENTRY/END.
Christopher Ferris [Tue, 19 Nov 2013 21:45:27 +0000 (13:45 -0800)]
Add .cfi_startproc/.cfi_endproc to ENTRY/END.

Bug: 10414953
Change-Id: I711718098b9f3cc0ba8277778df64557e9c7b2a0

8 years agoam bf652a5f: Merge "Provide <sys/user.h>."
Elliott Hughes [Wed, 20 Nov 2013 00:25:22 +0000 (16:25 -0800)]
am bf652a5f: Merge "Provide <sys/user.h>."

* commit 'bf652a5f5c1249471cb6a60b5bda5ddf1e94a635':
  Provide <sys/user.h>.

8 years agoMerge "Provide <sys/user.h>."
Elliott Hughes [Wed, 20 Nov 2013 00:21:29 +0000 (00:21 +0000)]
Merge "Provide <sys/user.h>."

8 years agoProvide <sys/user.h>.
Elliott Hughes [Tue, 19 Nov 2013 23:32:31 +0000 (15:32 -0800)]
Provide <sys/user.h>.

strace wants this, for example.

Change-Id: Icb4d64bde392abbc091fa3375a4fa19b2707b12c

8 years agoam 1b2d214b: Merge "Clean up forking and cloning."
Elliott Hughes [Tue, 19 Nov 2013 22:12:38 +0000 (14:12 -0800)]
am 1b2d214b: Merge "Clean up forking and cloning."

* commit '1b2d214b62ad7bf46f37c79442a69d930aa29027':
  Clean up forking and cloning.

8 years agoMerge "Clean up forking and cloning."
Elliott Hughes [Tue, 19 Nov 2013 22:09:53 +0000 (22:09 +0000)]
Merge "Clean up forking and cloning."

8 years agoClean up forking and cloning.
Elliott Hughes [Tue, 19 Nov 2013 21:31:58 +0000 (13:31 -0800)]
Clean up forking and cloning.

The kernel now maintains the pthread_internal_t::tid field for us,
and __clone was only used in one place so let's inline it so we don't
have to leave such a dangerous function lying around. Also rename
files to match their content and remove some useless #includes.

Change-Id: I24299fb4a940e394de75f864ee36fdabbd9438f9

8 years agoam 9d70ddc4: Merge "Add test case for 1^NaN"
Narayan Kamath [Tue, 19 Nov 2013 09:59:28 +0000 (01:59 -0800)]
am 9d70ddc4: Merge "Add test case for 1^NaN"

* commit '9d70ddc466ed0bdb36908d69b1fe849904150eb7':
  Add test case for 1^NaN

8 years agoMerge "Add test case for 1^NaN"
Narayan Kamath [Tue, 19 Nov 2013 09:56:53 +0000 (09:56 +0000)]
Merge "Add test case for 1^NaN"

8 years agoam 318e86ed: Merge "bionic: call stdio cleanup on exit"
Elliott Hughes [Tue, 19 Nov 2013 04:05:09 +0000 (20:05 -0800)]
am 318e86ed: Merge "bionic: call stdio cleanup on exit"

* commit '318e86ed887e04e593f3db9b84b402d5501ced9b':
  bionic: call stdio cleanup on exit

8 years agoMerge "bionic: call stdio cleanup on exit"
Elliott Hughes [Tue, 19 Nov 2013 04:01:54 +0000 (04:01 +0000)]
Merge "bionic: call stdio cleanup on exit"

8 years agoam 303fe0cb: Merge "Fix pthread_join."
Elliott Hughes [Tue, 19 Nov 2013 03:51:34 +0000 (19:51 -0800)]
am 303fe0cb: Merge "Fix pthread_join."

* commit '303fe0cb38def66aa438b9caac32e5af298f840a':
  Fix pthread_join.

8 years agoMerge "Fix pthread_join."
Elliott Hughes [Tue, 19 Nov 2013 03:48:59 +0000 (03:48 +0000)]
Merge "Fix pthread_join."

8 years agoFix pthread_join.
Elliott Hughes [Sat, 16 Nov 2013 01:40:18 +0000 (17:40 -0800)]
Fix pthread_join.

Let the kernel keep pthread_internal_t::tid updated, including
across forks and for the main thread. This then lets us fix
pthread_join to only return after the thread has really exited.

Also fix the thread attributes of the main thread so we don't
unmap the main thread's stack (which is really owned by the
dynamic linker and contains things like environment variables),
which fixes crashes when joining with an exited main thread
and also fixes problems reported publicly with accessing environment
variables after the main thread exits (for which I've added a new
unit test).

In passing I also fixed a bug where if the clone(2) inside
pthread_create(3) fails, we'd unmap the child's stack and TLS (which
contains the mutex) and then try to unlock the mutex. Boom! It wasn't
until after I'd uploaded the fix for this that I came across a new
public bug reporting this exact failure.

Bug: 8206355
Bug: 11693195
Bug: https://code.google.com/p/android/issues/detail?id=57421
Bug: https://code.google.com/p/android/issues/detail?id=62392
Change-Id: I2af9cf6e8ae510a67256ad93cad891794ed0580b

8 years agobionic: call stdio cleanup on exit
Pawit Pornkitprasan [Thu, 14 Nov 2013 16:50:45 +0000 (23:50 +0700)]
bionic: call stdio cleanup on exit

As of 61e699a133a4807fe878a6cb0d7190d7c96e21f8, stdio clean up
functions are no longer registered in atexit and must be called
manually via __cleanup.

The issue this fixes is some static binaries linked against bionic
cannot output properly when piped or redirected because the buffer
is not flushed before closing.

This is done by pulling in exit.c (and other dependencies) from
netbsd.

Change-Id: I193e54a6d08900f291550029fe75ce76394d9e22

8 years agoam 862faa12: Merge "Pull in cleaned version.h header."
Christopher Ferris [Mon, 18 Nov 2013 23:29:38 +0000 (15:29 -0800)]
am 862faa12: Merge "Pull in cleaned version.h header."

* commit '862faa12928038759e1bbdbc394a7d58b560f128':
  Pull in cleaned version.h header.

8 years agoMerge "Pull in cleaned version.h header."
Christopher Ferris [Mon, 18 Nov 2013 23:26:59 +0000 (23:26 +0000)]
Merge "Pull in cleaned version.h header."

8 years agoam be8344bb: Merge "Modify tests for another glibc difference."
Christopher Ferris [Mon, 18 Nov 2013 21:38:12 +0000 (13:38 -0800)]
am be8344bb: Merge "Modify tests for another glibc difference."

* commit 'be8344bb068183715f808768341bce7fb69d5a70':
  Modify tests for another glibc difference.

8 years agoMerge "Modify tests for another glibc difference."
Christopher Ferris [Mon, 18 Nov 2013 21:35:20 +0000 (21:35 +0000)]
Merge "Modify tests for another glibc difference."

8 years agoAdd test case for 1^NaN
Narayan Kamath [Mon, 18 Nov 2013 18:47:48 +0000 (18:47 +0000)]
Add test case for 1^NaN

Should be 1.

Change-Id: I6cf723a419f51d3bda58286a538774b71276c7b5

8 years agoPull in cleaned version.h header.
Christopher Ferris [Sat, 16 Nov 2013 00:29:28 +0000 (16:29 -0800)]
Pull in cleaned version.h header.

Change-Id: Ia917af9336b63ed5a10147770a8110134cb274cb

8 years agoModify tests for another glibc difference.
Christopher Ferris [Fri, 15 Nov 2013 23:16:01 +0000 (15:16 -0800)]
Modify tests for another glibc difference.

It turns out that when passing a closed file to getdelim or getline, the
functions in glibc will properly return a failure, but errno might not be
set. Skip the errno check except on bionic.

Change-Id: I8d625f15303d4c2d42e8d28491ea8a368aea4d32

8 years agoam f246c589: Merge "Clean up the pthread_create trampoline."
Elliott Hughes [Fri, 15 Nov 2013 23:31:28 +0000 (15:31 -0800)]
am f246c589: Merge "Clean up the pthread_create trampoline."

* commit 'f246c589d66e5dc0e3cddc3c37261fb0e3fc67e9':
  Clean up the pthread_create trampoline.

8 years agoMerge "Clean up the pthread_create trampoline."
Elliott Hughes [Fri, 15 Nov 2013 23:27:36 +0000 (23:27 +0000)]
Merge "Clean up the pthread_create trampoline."

8 years agoClean up the pthread_create trampoline.
Elliott Hughes [Fri, 15 Nov 2013 22:57:45 +0000 (14:57 -0800)]
Clean up the pthread_create trampoline.

Bug: 8206355
Bug: 11693195
Change-Id: I35cc024d5b6ebd19d1d2e45610db185addaf45df

8 years agoam e39e3a77: Merge "Add new tests for memory/string routines."
Christopher Ferris [Fri, 15 Nov 2013 22:51:02 +0000 (14:51 -0800)]
am e39e3a77: Merge "Add new tests for memory/string routines."

* commit 'e39e3a77d6e8cf681718a572bc754fd64dfc87ff':
  Add new tests for memory/string routines.

8 years agoam 645d4269: Merge "Switch pthread_create over to __bionic_clone."
Elliott Hughes [Fri, 15 Nov 2013 22:47:32 +0000 (14:47 -0800)]
am 645d4269: Merge "Switch pthread_create over to __bionic_clone."

* commit '645d4269d323acdcb20d1c31c15dbb4afbb9f46a':
  Switch pthread_create over to __bionic_clone.

8 years agoMerge "Add new tests for memory/string routines."
Christopher Ferris [Fri, 15 Nov 2013 22:47:07 +0000 (22:47 +0000)]
Merge "Add new tests for memory/string routines."

8 years agoMerge "Switch pthread_create over to __bionic_clone."
Elliott Hughes [Fri, 15 Nov 2013 22:42:56 +0000 (22:42 +0000)]
Merge "Switch pthread_create over to __bionic_clone."

8 years agoSwitch pthread_create over to __bionic_clone.
Elliott Hughes [Fri, 15 Nov 2013 19:51:07 +0000 (11:51 -0800)]
Switch pthread_create over to __bionic_clone.

Bug: 8206355
Bug: 11693195
Change-Id: I04aadbc36c87e1b7e33324b9a930a1e441fbfed6

8 years agoAdd new tests for memory/string routines.
Christopher Ferris [Thu, 7 Nov 2013 01:32:11 +0000 (17:32 -0800)]
Add new tests for memory/string routines.

Create a few generic testing functions to allow any memory/string tests
to be created.

Add alignment tests for memcpy/memset/strcat/strcpy/strlen.

Add an overread test for memcpy/strcat/strcpy/strlen. This test attempts
to verify that the functions do not read past the end of their buffers
(src buffer in the case of src/dst functions).

Bug: 9797008

Change-Id: Ib3223ca1b99e729ae8229adc2d03f4dc3103d97c

8 years agoam 60a67a0c: am 05ec00bf: Merge "[MIPS] Reimplement syscall to invoke the system...
Elliott Hughes [Fri, 15 Nov 2013 01:07:13 +0000 (17:07 -0800)]
am 60a67a0c: am 05ec00bf: Merge "[MIPS] Reimplement syscall to invoke the system call directly"

* commit '60a67a0c7e44dfc47b9b4271ea4ae2dbf336849a':
  [MIPS] Reimplement syscall to invoke the system call directly

8 years agoam 05ec00bf: Merge "[MIPS] Reimplement syscall to invoke the system call directly"
Elliott Hughes [Fri, 15 Nov 2013 01:05:10 +0000 (17:05 -0800)]
am 05ec00bf: Merge "[MIPS] Reimplement syscall to invoke the system call directly"

* commit '05ec00bf62ac168c9787a3d0640879ab3e502fe5':
  [MIPS] Reimplement syscall to invoke the system call directly

8 years agoMerge "[MIPS] Reimplement syscall to invoke the system call directly"
Elliott Hughes [Fri, 15 Nov 2013 01:01:06 +0000 (01:01 +0000)]
Merge "[MIPS] Reimplement syscall to invoke the system call directly"

8 years ago[MIPS] Reimplement syscall to invoke the system call directly
Chris Dearman [Wed, 13 Nov 2013 22:15:31 +0000 (14:15 -0800)]
[MIPS] Reimplement syscall to invoke the system call directly

Some MIPS kernels do not correctly restart interrupted system calls that
have been invoked using the indirect syscall (NR_syscall).

The simplest workaround is to handle the indirection in userland and then
call the required system call directly.

Change-Id: I8385399621529db9a52b463c96925f6decaaca30

8 years agoam 5a70acd1: am ae5c3dd7: Merge "Remove the mips regdef.h and fpregdef.h old kernel...
Elliott Hughes [Thu, 14 Nov 2013 00:28:37 +0000 (16:28 -0800)]
am 5a70acd1: am ae5c3dd7: Merge "Remove the mips regdef.h and fpregdef.h old kernel headers."

* commit '5a70acd176a792868a61c94169d5e6c0679202f2':
  Remove the mips regdef.h and fpregdef.h old kernel headers.

8 years agoam ae5c3dd7: Merge "Remove the mips regdef.h and fpregdef.h old kernel headers."
Elliott Hughes [Thu, 14 Nov 2013 00:24:33 +0000 (16:24 -0800)]
am ae5c3dd7: Merge "Remove the mips regdef.h and fpregdef.h old kernel headers."

* commit 'ae5c3dd73844e6a9e1a14dbf893eab5142902f18':
  Remove the mips regdef.h and fpregdef.h old kernel headers.