Commit Graph

4461 Commits

Author SHA1 Message Date
Christopher Ferris
2779dc7373 am 1a3a9d4d: am e4068e33: am 94170742: Merge "Fix x86 cfi directives for syscalls."
* commit '1a3a9d4d99557021a77d2d903775adabb24560f4':
  Fix x86 cfi directives for syscalls.
2014-05-30 02:29:08 +00:00
Christopher Ferris
15b91e92a0 Fix x86 cfi directives for syscalls.
The syscall generation always used 4 bytes for each push cfi directive.
However, the first push should always use an offset of 8 bytes, each
subsequent push after that is only 4 bytes though.

Change-Id: Ibaabd107f399ef67010b9a08213783957c2f74a9
2014-05-29 19:04:36 -07:00
Elliott Hughes
768fa1f636 am 2f97e423: am e1df1eb2: am 264d1b83: Merge "Remove issetugid."
* commit '2f97e423274793c1b47a5be2479f767fd26bbc54':
  Remove issetugid.
2014-05-30 00:17:37 +00:00
Elliott Hughes
b4e099c6f7 Remove issetugid.
Bug: 14569474
Change-Id: I752c77ed53c724f144f0b618443eb95e87f2929a
2014-05-29 16:43:01 -07:00
Christopher Ferris
a6ee6ac422 am 4704238d: am 84d90bf5: am aa5f32ea: Merge "Add Aarch64 optimized bzero based on memset"
* commit '4704238dd27095886e273edc3902722e8f941310':
  Add Aarch64 optimized bzero based on memset
2014-05-29 21:30:37 +00:00
Christopher Ferris
aa5f32ea1c Merge "Add Aarch64 optimized bzero based on memset" 2014-05-29 21:19:44 +00:00
Elliott Hughes
0f20aafa25 am 8efc3054: am dafa59b8: am 4dd0b72d: Merge "Return the actual success result from __futex."
* commit '8efc30544f5ef32395d97f41139d1906a21ca06f':
  Return the actual success result from __futex.
2014-05-29 21:10:06 +00:00
Christopher Ferris
ea1004b6b3 am deb1ec4a: am 47150dca: am 1a57de71: Merge "Fix overflow testing in sbrk."
* commit 'deb1ec4aaa0e7f74746c97ccbc22a367640c301f':
  Fix overflow testing in sbrk.
2014-05-29 21:09:29 +00:00
Bernhard Rosenkraenzer
62d92e1610 Add Aarch64 optimized bzero based on memset
Change-Id: I62cf25bfe23b9d811e00af7307bbd19d89937792
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2014-05-29 13:28:55 -07:00
Elliott Hughes
4dd0b72dd3 Merge "Return the actual success result from __futex." 2014-05-29 20:12:06 +00:00
Christopher Ferris
1a57de713a Merge "Fix overflow testing in sbrk." 2014-05-29 18:03:28 +00:00
Christopher Ferris
738b0cc5e9 Fix overflow testing in sbrk.
Modify the overflow testing for sbrk.

Bug: 15188366

Change-Id: Ia83f85f7c1789454d872279bd41f38f1ce6b8a34
2014-05-29 10:51:22 -07:00
Elliott Hughes
1ee46520ca Return the actual success result from __futex.
futex(2) can return non-zero successes.

Bug: 15195455
Change-Id: I7818bc922a5a2df31228ff72c169320b5e69a544
2014-05-29 10:27:55 -07:00
Elliott Hughes
dd4489bfbe am 4843fab2: am ad73e2f5: am ef023873: Merge "Minor style cleanup of some code I had to look at."
* commit '4843fab2ee025fae5e04d84dd687e507fc4e99f0':
  Minor style cleanup of some code I had to look at.
2014-05-29 16:23:08 +00:00
Elliott Hughes
864b926026 am 8a00b45d: am c3930812: am 0bdd668f: Merge "Upgrade to tzdata2014d."
* commit '8a00b45d601d6e9a5a7ab63544f66267ed1a857b':
  Upgrade to tzdata2014d.
2014-05-29 16:23:07 +00:00
Elliott Hughes
ef023873e2 Merge "Minor style cleanup of some code I had to look at." 2014-05-29 16:12:02 +00:00
Elliott Hughes
b7f136a01f Upgrade to tzdata2014d.
There are no substantive changes to the data in this release. I'm applying
this just for completeness.

Change-Id: Ibe953969cb16db4d8d1ddb7dd3c943316e6e46b4
2014-05-28 20:33:33 -07:00
Elliott Hughes
624996026b Minor style cleanup of some code I had to look at.
(It turns out that this is the only place we're saying __inline in C++.)

Change-Id: I8095e67a385087817c47caab9a621f82f8e0cfc8
2014-05-28 20:30:40 -07:00
Elliott Hughes
49d1ce63d9 am 275906e4: am 3388c7be: am fae42a83: Merge "Revert "Revert "Lose the hand-written futex assembler."""
* commit '275906e4b08062e50dbd0b1938a9a1379f577649':
  Revert "Revert "Lose the hand-written futex assembler.""
2014-05-29 03:22:03 +00:00
Elliott Hughes
fae42a837a Merge "Revert "Revert "Lose the hand-written futex assembler.""" 2014-05-29 03:13:23 +00:00
Elliott Hughes
b30aff405a Revert "Revert "Lose the hand-written futex assembler.""
The problem with the original patch was that using syscall(3) means that
errno can be set, but pthread_create(3) was abusing the TLS errno slot as
a pthread_mutex_t for the thread startup handshake.

There was also a mistake in the check for syscall failures --- it should
have checked against -1 instead of 0 (not just because that's the default
idiom, but also here because futex(2) can legitimately return values > 0).

This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to
pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) >
sizeof(uintptr_t), so we could potentially clobber other TLS slots too.)

I've also rewritten the LP32 compatibility stubs to directly reuse the
code from the .h file.

This reverts commit 75c55ff84e.

Bug: 15195455
Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
2014-05-28 18:31:15 -07:00
Dan Albert
cd4e99048a am e4f5ae5d: am c51e9208: am dc3fb119: Merge "Updated ambiguous comment in pthread_mutex_lock."
* commit 'e4f5ae5d54865d6f61a32eeba6af846550d2a254':
  Updated ambiguous comment in pthread_mutex_lock.
2014-05-28 22:18:10 +00:00
Christopher Ferris
48c544f1c2 am 02d1cfb3: am fa204cf0: am 8a405b02: Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"
* commit '02d1cfb366b461d4c64cc87fc0f48bc3eae5fd92':
  Add optimized AArch64 versions of bcopy and wmemmove based on memmove
2014-05-28 22:17:56 +00:00
Dan Albert
dc3fb11949 Merge "Updated ambiguous comment in pthread_mutex_lock." 2014-05-28 22:00:50 +00:00
Christopher Ferris
8a405b027a Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove" 2014-05-28 21:35:04 +00:00
Brigid Smith
ff03a7aaad Updated ambiguous comment in pthread_mutex_lock.
The comment used the phrase "normal case" when it more specifically refers to the "recursive case," so I changed it to that.

Change-Id: I8335cce4dee933c6a463aee653b28bd986b5b5e4
2014-05-28 11:48:49 -07:00
Narayan Kamath
dc3178707d am adb1ec50: am 784254f2: am 52f74322: Merge "Revert "Lose the hand-written futex assembler.""
* commit 'adb1ec509e4866eab1f0a7fb8b99dd31e5d8e23f':
  Revert "Lose the hand-written futex assembler."
2014-05-28 18:14:34 +00:00
Calin Juravle
15627c1016 am c3f22810: am 7ca4d736: am 53e70fe3: Merge "Remove unnecessary padding in ucontext_t"
* commit 'c3f228103f0ff855214e0d15d51a26da7723d3b6':
  Remove unnecessary padding in ucontext_t
2014-05-28 18:10:34 +00:00
Narayan Kamath
52f74322b1 Merge "Revert "Lose the hand-written futex assembler."" 2014-05-28 18:04:26 +00:00
Narayan Kamath
75c55ff84e Revert "Lose the hand-written futex assembler."
This reverts commit ced906c849.

Causes issues on art / dalvik due to a broken return value
check and other undiagnosed issues.

bug: 15195455

Change-Id: I5d6bbb389ecefb0e33a5237421a9d56d32a9317c
2014-05-28 18:03:01 +00:00
Elliott Hughes
0ba998b3c3 am 44445f2d: am ab4c4686: am 7fdde4a5: Merge "Expose __srefill for LP64 until we can fix the NDK."
* commit '44445f2d51e946f6ba14101058a1cc6157f2e185':
  Expose __srefill for LP64 until we can fix the NDK.
2014-05-28 18:02:08 +00:00
Calin Juravle
bdca3802c9 Remove unnecessary padding in ucontext_t
- removed extra padding from ucontex_t on x86, x86_64 and mips
- force ucontext_t struct to use 64 bits for the sigmask on all arches
(previsouly wrong since sigset_t on arm and x86 is only 32 bits)
- arm and arm64 continue to use padding to match glibc sigset_t

This brings Bionic on par with the kernel w.r.t ucontext padding.

Bug: 12828904
Change-Id: Ia8915ace694ecb4695603a334e697985f4c3e7aa
2014-05-28 17:24:28 +01:00
Elliott Hughes
f6d2ca2696 Expose __srefill for LP64 until we can fix the NDK.
The LP64 has a duplicate copy of part of stdio, and relies
on bionic supplying this part. We should remove the hack from
the NDK, at least for LP64, and then revert this.

Bug: 15291317
Change-Id: I75e06e130188ca0aeb9d50dfe3a3e48a1d3968b7
2014-05-27 21:23:36 -07:00
Elliott Hughes
0f1a221b3a am faf071df: am 9e3a0356: am 1454ff25: Merge "Clear the return address register in __bionic_clone."
* commit 'faf071dfcb2f6811727dfdfc70574552639b937c':
  Clear the return address register in __bionic_clone.
2014-05-27 23:01:16 +00:00
Elliott Hughes
1454ff2574 Merge "Clear the return address register in __bionic_clone." 2014-05-27 22:53:52 +00:00
Elliott Hughes
e7dccdf683 Clear the return address register in __bionic_clone.
The unwinder will end up on the parent thread's stack if the return
address register is not cleared.

Bug: 14270816
Bug: 15195760
Change-Id: Iebcdf5cc881cad245643bb193760de35eb7f8b19
2014-05-27 15:49:51 -07:00
Dan Albert
493b5cb6ac am 923619f6: am 4a542fc5: am 134911d7: Merge "Use __typeof__() instead of typeof()"
* commit '923619f6e22cc76db598c7e0331ce3d1a470943d':
  Use __typeof__() instead of typeof()
2014-05-27 22:03:37 +00:00
Dan Albert
a7821b7121 Use __typeof__() instead of typeof()
typeof() is a gcc builtin and is not always available (such as clang when
-std=c*). Both gcc and clang always expose __typeof__(), so just use that.

Change-Id: I75e2a990acc35f6f39b2c353f6548100ec03c67f
2014-05-27 12:47:54 -07:00
Elliott Hughes
0ad4b21658 am 5264518f: am 946bc952: am 8e85b4f0: Merge "Restore __srefill for LP32."
* commit '5264518f61f506bb025b17520ae5e0f0bba9cb85':
  Restore __srefill for LP32.
2014-05-27 18:48:41 +00:00
Elliott Hughes
aa50585d96 Restore __srefill for LP32.
The NDK apparently includes an android_support.a library that
refers to __srefill in its copy of the vsnprintf implementation.

Bug: 15249361
Change-Id: Ic2cf6f21290b3146c42fbe0624f5e4d54f6194b4
2014-05-27 11:22:39 -07:00
Elliott Hughes
06b3711de3 am ab4064bc: am 50c52f74: am b3c75a1e: Merge "Restore __srget and __swbuf for LP32."
* commit 'ab4064bc9308dca7880ecca6ee52242642dfa2a7':
  Restore __srget and __swbuf for LP32.
2014-05-26 08:49:00 +00:00
Elliott Hughes
b3c75a1e8f Merge "Restore __srget and __swbuf for LP32." 2014-05-26 05:07:20 +00:00
Elliott Hughes
23826c81d4 am 6571b81b: am 21296dfe: am bc904896: Merge "Add C11 <stdatomic.h>."
* commit '6571b81b1f8f8ade80024a99af37fcf42514aaae':
  Add C11 <stdatomic.h>.
2014-05-25 17:56:53 +00:00
Elliott Hughes
bc904896a6 Merge "Add C11 <stdatomic.h>." 2014-05-25 17:48:19 +00:00
Elliott Hughes
35d90bb6ec Restore __srget and __swbuf for LP32.
Anthony King <anthonydking@slimroms.net> reports that for Grouper the
Nvidia GL blobs need access to __swbuf. This is because the old <stdio.h>
had inline getc and putc implementations that directly referred to these
symbols.

Change-Id: I11a7b5550018ecc93d8f195c99857759669b2906
2014-05-25 10:38:25 -07:00
Elliott Hughes
d460da0813 am abc68292: am 06c9662a: am 255789e4: Merge "Restore tkill for LP32."
* commit 'abc68292b48741fa646b8f16263cae3c42012dc8':
  Restore tkill for LP32.
2014-05-25 03:24:01 +00:00
Elliott Hughes
7b9626f449 am 4d436a2f: am 85df714f: am d4f37110: Merge "Restore __futex_wake and __futex_wait for LP32."
* commit '4d436a2fdc3a847571a69c22d2cfefeef29ca9a2':
  Restore __futex_wake and __futex_wait for LP32.
2014-05-25 03:17:25 +00:00
Anthony King
001707363d Restore tkill for LP32.
libmono from Unity still requires tkill(2).

Change-Id: I37a1994b08086c7fedb5c78ea0dadf2d72bc1463
Signed-off-by: Anthony King <anthonydking@slimroms.net>
2014-05-24 20:13:13 -07:00
Elliott Hughes
bd3a98c6b9 Restore __futex_wake and __futex_wait for LP32.
Should fix Skype:

  java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__futex_wake" referenced by "libsliq.so"...

Bug: 15196718
Change-Id: I8a18e18d830f0436e820cbde577121bd92710803
2014-05-24 17:19:36 -07:00
Elliott Hughes
e6c57fcb05 Add C11 <stdatomic.h>.
Bug: 14903517
Change-Id: I631dbfdaa698cf7fea8e3b5e18a32586383e62a5
2014-05-23 20:06:03 -07:00