Commit Graph

2270 Commits

Author SHA1 Message Date
Elliott Hughes
fb7a4850b8 am ff26e25b: am 44badc70: Merge "Upgrade libm."
# Via Android Git Automerger (1) and others
* commit 'ff26e25b51eb672a4c8244946e0f2b4328786f55':
  Upgrade libm.
2013-02-04 11:29:22 -08:00
Elliott Hughes
ada6de673b am a1821f01: Merge "Regenerate msm_ion.h."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a1821f015306e221e6a51e5acc27176ae2d72f6b':
  Regenerate msm_ion.h.
2013-02-04 10:52:16 -08:00
Elliott Hughes
3fac8f7f49 Regenerate msm_ion.h.
Bug: 8000377
Change-Id: If496d9972cb8aebfc996ac641aa762220aa71f3b
2013-02-01 18:21:08 -08:00
Elliott Hughes
16444e0f85 am 3dc6b57c: Merge "Don\'t claim there were no leaks if we weren\'t even checking."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '3dc6b57cf54b15a756551deeda33df5715e519bb':
  Don't claim there were no leaks if we weren't even checking.
2013-02-01 17:26:56 -08:00
Elliott Hughes
9c81892c2e Don't claim there were no leaks if we weren't even checking.
Bug: 8107016
Change-Id: I9059f1f8374ebcdf00dfc6ac74d3709f501292c9
2013-02-01 17:07:40 -08:00
Brian Muramatsu
322c7edba3 Remove MSM headers
Bug 7115545

These headers will be moved to hardware/qcom/msm8960 project.

Change-Id: Idb970c196be239e186e0a406d19135aa27225aca
2013-02-01 16:28:40 -08:00
Elliott Hughes
704d9c5b45 am a9dd3670: Merge "Restore bionic\'s <linux/elf-em.h>."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a9dd36702f4a9d65d084387050b688b8965b13b3':
  Restore bionic's <linux/elf-em.h>.
2013-02-01 16:19:37 -08:00
Elliott Hughes
a48e1b2aac Restore bionic's <linux/elf-em.h>.
Used by <linux/audit.h>.

Change-Id: Ica4ebb7f52a7fce13c52fdff35e187ded3939382
2013-02-01 16:10:28 -08:00
Elliott Hughes
ff26e25b51 am 44badc70: Merge "Upgrade libm."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '44badc70ccd35d7690bda9f107e3e5da0b80d295':
  Upgrade libm.
2013-02-01 15:24:27 -08:00
Elliott Hughes
44badc70cc Merge "Upgrade libm." 2013-02-01 23:07:49 +00:00
Elliott Hughes
a0ee07829a Upgrade libm.
This brings us up to date with FreeBSD HEAD, fixes various bugs, unifies
the set of functions we support on ARM, MIPS, and x86, fixes "long double",
adds ISO C99 support, and adds basic unit tests.

It turns out that our "long double" functions have always been broken
for non-normal numbers. This patch fixes that by not using the upstream
implementations and just forwarding to the regular "double" implementation
instead (since "long double" on Android is just "double" anyway, which is
what BSD doesn't support).

All the tests pass on ARM, MIPS, and x86, plus glibc on x86-64.

Bug: 3169850
Bug: 8012787
Bug: https://code.google.com/p/android/issues/detail?id=6697
Change-Id: If0c343030959c24bfc50d4d21c9530052c581837
2013-02-01 14:51:19 -08:00
Elliott Hughes
8db7a4cb20 am 9743d7fb: am fb55511e: am e1a124e5: Merge "Say explicitly if there were no leaks."
# Via Android Git Automerger (2) and others
* commit '9743d7fb60836229fde0fbdbd9fb87c78eaa00b7':
  Say explicitly if there were no leaks.
2013-01-30 12:27:12 -08:00
Elliott Hughes
9743d7fb60 am fb55511e: am e1a124e5: Merge "Say explicitly if there were no leaks."
# Via Android Git Automerger (1) and others
* commit 'fb55511e71900476fd03f9c490dc60269d076d1f':
  Say explicitly if there were no leaks.
2013-01-30 12:11:30 -08:00
Elliott Hughes
fb55511e71 am e1a124e5: Merge "Say explicitly if there were no leaks."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'e1a124e5c93b59e2b6792e4de8a2c72dc0a78be1':
  Say explicitly if there were no leaks.
2013-01-30 12:09:14 -08:00
Elliott Hughes
1d12d57416 Say explicitly if there were no leaks.
Otherwise people trying to use this are left wondering "did I not leak, or did
the leak checking code not get called when I exited?".

Change-Id: If79b225f8a2e24dd69aba1fb836bf9e81bb00efe
2013-01-30 11:38:26 -08:00
Elliott Hughes
0243962d20 am 9d43c079: am 4e882503: am a990cf5b: Merge "Clean up trailing whitespace in the kernel headers."
# Via Android Git Automerger (2) and others
* commit '9d43c079875ebd2540daccb180e9d6d0fa06061d':
  Clean up trailing whitespace in the kernel headers.
2013-01-30 10:33:52 -08:00
Elliott Hughes
9d43c07987 am 4e882503: am a990cf5b: Merge "Clean up trailing whitespace in the kernel headers."
# Via Android Git Automerger (1) and others
* commit '4e8825038e08762dcc973fa435b531f10290ffa8':
  Clean up trailing whitespace in the kernel headers.
2013-01-30 10:31:24 -08:00
Elliott Hughes
4e8825038e am a990cf5b: Merge "Clean up trailing whitespace in the kernel headers."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a990cf5b3392c5aef767aee1e67b4d7ef651afc6':
  Clean up trailing whitespace in the kernel headers.
2013-01-30 10:28:59 -08:00
Elliott Hughes
a990cf5b33 Merge "Clean up trailing whitespace in the kernel headers." 2013-01-30 18:13:29 +00:00
Elliott Hughes
c95eb57405 Clean up trailing whitespace in the kernel headers.
And fix the scripts so they stop letting trailing whitespace through.

Change-Id: Ie109fbe1f63321e565ba0fa60fee8e9cf3a61cfc
2013-01-30 10:13:07 -08:00
Elliott Hughes
8dfe0daf6f am 5821e11d: am 7bc49fcf: am 323287ea: Merge "Fix valgrind build."
# Via Android Git Automerger (2) and others
* commit '5821e11d0b577fda45b81f0c9ea13c1c1c5de1a8':
  Fix valgrind build.
2013-01-29 18:11:34 -08:00
Elliott Hughes
5821e11d0b am 7bc49fcf: am 323287ea: Merge "Fix valgrind build."
# Via Android Git Automerger (1) and others
* commit '7bc49fcfc0de8ce6f386f362cdab6902e6bbe7b4':
  Fix valgrind build.
2013-01-29 18:09:26 -08:00
Elliott Hughes
7bc49fcfc0 am 323287ea: Merge "Fix valgrind build."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '323287ea7fb1d22f64b49d701b33cef9fbaf757d':
  Fix valgrind build.
2013-01-29 18:06:19 -08:00
Elliott Hughes
6fe67c3cf2 Fix valgrind build.
Change-Id: Ie375d32565d10f4c0c56da5422f52b68cb069654
2013-01-29 17:49:12 -08:00
Elliott Hughes
278c059663 am 9d995d67: am 1cc09402: am f6721978: Merge "Fix x86 build to use <elf.h>."
# Via Android Git Automerger (2) and others
* commit '9d995d67217e44e022c9e5d0767634fa81f87b78':
  Fix x86 build to use <elf.h>.
2013-01-29 17:09:13 -08:00
Elliott Hughes
d9397a7c5e am 0a383883: am be11de2b: am 5fb409b7: Merge "Bring the NOTICE files back up to date."
# Via Android Git Automerger (2) and others
* commit '0a383883fa3d358ff4af6b653a0918f4cd01ef7e':
  Bring the NOTICE files back up to date.
2013-01-29 17:09:12 -08:00
Elliott Hughes
a1b8c145cb am a7f44b5a: am 172e038f: am f09f6db5: Merge "Use the NetBSD <sys/exec_elf.h>."
# Via Android Git Automerger (2) and others
* commit 'a7f44b5afe64199eeee715e613c7d42d2724232c':
  Use the NetBSD <sys/exec_elf.h>.
2013-01-29 17:09:11 -08:00
Elliott Hughes
9d995d6721 am 1cc09402: am f6721978: Merge "Fix x86 build to use <elf.h>."
# Via Android Git Automerger (1) and others
* commit '1cc09402e86b91213e06a9a349c5c510cefcf1d5':
  Fix x86 build to use <elf.h>.
2013-01-29 17:04:14 -08:00
Elliott Hughes
0a383883fa am be11de2b: am 5fb409b7: Merge "Bring the NOTICE files back up to date."
# Via Android Git Automerger (1) and others
* commit 'be11de2b52ac5f8cbb5a733821cb27002f2ea975':
  Bring the NOTICE files back up to date.
2013-01-29 17:04:13 -08:00
Elliott Hughes
a7f44b5afe am 172e038f: am f09f6db5: Merge "Use the NetBSD <sys/exec_elf.h>."
# Via Android Git Automerger (1) and others
* commit '172e038f9e5b711a77afe7e8899343215cf25c9e':
  Use the NetBSD <sys/exec_elf.h>.
2013-01-29 17:04:11 -08:00
Elliott Hughes
1cc09402e8 am f6721978: Merge "Fix x86 build to use <elf.h>."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'f67219783fa7c38c1f4f077364290d10d3aa1db4':
  Fix x86 build to use <elf.h>.
2013-01-29 16:58:45 -08:00
Elliott Hughes
be11de2b52 am 5fb409b7: Merge "Bring the NOTICE files back up to date."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '5fb409b7b0b0a4ecca5fd2a6c7dc5ce421f6b7cf':
  Bring the NOTICE files back up to date.
2013-01-29 16:42:04 -08:00
Elliott Hughes
d070df4c74 Fix x86 build to use <elf.h>.
Change-Id: I7b697d5eae69dc08eb31471a42cb8bbe5360be76
2013-01-29 16:40:39 -08:00
Elliott Hughes
172e038f9e am f09f6db5: Merge "Use the NetBSD <sys/exec_elf.h>."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'f09f6db5dd87856bbbb7a3d465187b9d8799a788':
  Use the NetBSD <sys/exec_elf.h>.
2013-01-29 16:26:10 -08:00
Elliott Hughes
448080d372 Bring the NOTICE files back up to date.
Change-Id: I978275cf6604b90595ee79d897c0460eeadc7dc8
2013-01-29 16:25:06 -08:00
Elliott Hughes
a6a3ac5924 Use the NetBSD <sys/exec_elf.h>.
Replace a kernel header file dependency with files from NetBSD.
They're more complete, and ELF is ELF, whether you're on Linux or a BSD.

Bug: 7973611
Change-Id: I83ee719e7efdf432ec2ddbe8be271d05b2f558d7
2013-01-29 15:02:50 -08:00
Elliott Hughes
3638641014 am f5d6238c: am 3f20ecc2: am 3db2fc5a: Merge "Don\'t collect useless stack frames; do demangle C++ symbols."
# Via Android Git Automerger (2) and others
* commit 'f5d6238c4b6433f193c6d06c1dd89110b497e449':
  Don't collect useless stack frames; do demangle C++ symbols.
2013-01-29 12:09:31 -08:00
Elliott Hughes
f5d6238c4b am 3f20ecc2: am 3db2fc5a: Merge "Don\'t collect useless stack frames; do demangle C++ symbols."
# Via Android Git Automerger (1) and others
* commit '3f20ecc20486ae8fe8d9332102b503135f83c62d':
  Don't collect useless stack frames; do demangle C++ symbols.
2013-01-29 12:07:13 -08:00
Elliott Hughes
3f20ecc204 am 3db2fc5a: Merge "Don\'t collect useless stack frames; do demangle C++ symbols."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '3db2fc5acb4894a2cb22533b165a0de1bbafc3f6':
  Don't collect useless stack frames; do demangle C++ symbols.
2013-01-29 12:03:53 -08:00
Elliott Hughes
35b621c5f4 Don't collect useless stack frames; do demangle C++ symbols.
Previously, we'd collect every stack frame and then throw some away
when we came to log them. This meant that stack traces were effectively
shorter than the buffers that had been allocated for them. This patch
only stores frames we'll actually output.

Also dynamically call the C++ demangler so we don't have to try to
read mangled names. Because no one knows the mangling of operator new[]
for int arrays off the top of their head.

Bug: 7291287
Change-Id: I42b022fd7cd61675d05171de4c3b2704d058ef2a
2013-01-29 09:56:31 -08:00
Elliott Hughes
62228694a0 am 2218b89c: am d383ac15: am a0151cbf: Merge "Unit tests for formatting code, fix %%."
# Via Android Git Automerger (2) and others
* commit '2218b89ca7017e3f1cdb0641528787cd9985501a':
  Unit tests for formatting code, fix %%.
2013-01-28 14:14:44 -08:00
Elliott Hughes
2218b89ca7 am d383ac15: am a0151cbf: Merge "Unit tests for formatting code, fix %%."
# Via Android Git Automerger (1) and others
* commit 'd383ac1570b553d68ed399c74b73bad1498d78f6':
  Unit tests for formatting code, fix %%.
2013-01-28 14:11:54 -08:00
Elliott Hughes
d383ac1570 am a0151cbf: Merge "Unit tests for formatting code, fix %%."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a0151cbfbaa37965dbcd188a55a78d3ad4802b9b':
  Unit tests for formatting code, fix %%.
2013-01-28 14:10:08 -08:00
Elliott Hughes
41b3179c9e Unit tests for formatting code, fix %%.
Also fix <signal.h> and <stdio.h> so they don't cause compiler warnings.

Change-Id: Ib1a746bf01de22d47dbd964de0e6af80a7c96303
2013-01-28 10:36:31 -08:00
Elliott Hughes
609ca692a9 am d265d367: am f07db754: am 0a91b11d: Merge "More debug malloc fixes."
# Via Android Git Automerger (2) and others
* commit 'd265d3674937651d23a0252e6aad0ee09b02492a':
  More debug malloc fixes.
2013-01-25 18:11:55 -08:00
Elliott Hughes
d265d36749 am f07db754: am 0a91b11d: Merge "More debug malloc fixes."
# Via Android Git Automerger (1) and others
* commit 'f07db75443cce4ab96c93bdaa0793d7b8e87547e':
  More debug malloc fixes.
2013-01-25 18:09:45 -08:00
Elliott Hughes
f07db75443 am 0a91b11d: Merge "More debug malloc fixes."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '0a91b11d286446fe7849a6f537b4a21a52f63399':
  More debug malloc fixes.
2013-01-25 18:07:23 -08:00
Iliyan Malchev
ac10757e2a Merge "bionic: update processed msm_vidc_enc.h" 2013-01-26 01:41:55 +00:00
Elliott Hughes
239e7a0756 More debug malloc fixes.
Include the leaky executable's name in the log output. Fix the "sh" test.
Use uintptr_t instead of intptr_t.

Also fix debug formatting of NULL with %s.

Bug: 7291287
Change-Id: I015bf341cd48d43a247173612e6ccb1bf1243d53
2013-01-25 17:13:45 -08:00
Elliott Hughes
98ce9888b1 am 88af7232: am 7ae99845: am 6a94cb74: Merge "arm syscall : for eabi call_default don\'t use stack"
# By Matthieu Castet
# Via Android Git Automerger (2) and others
* commit '88af723267e86c7b2a685f97c6e442d3766ad9a9':
  arm syscall : for eabi call_default don't use stack
2013-01-25 17:11:52 -08:00
Nick Kralevich
85e76a3652 am 2ebcd19c: am 27818d2a: am b871e5d6: Merge "system_properties: do more checking of file"
# Via Android Git Automerger (2) and others
* commit '2ebcd19cbc42c5edce189df630a48feb9ffec16d':
  system_properties: do more checking of file
2013-01-25 17:11:51 -08:00
Elliott Hughes
88af723267 am 7ae99845: am 6a94cb74: Merge "arm syscall : for eabi call_default don\'t use stack"
# By Matthieu Castet
# Via Android Git Automerger (1) and others
* commit '7ae998456c2564aff4ecbe6a6df214821f6e26cc':
  arm syscall : for eabi call_default don't use stack
2013-01-25 14:10:02 -08:00
Nick Kralevich
2ebcd19cbc am 27818d2a: am b871e5d6: Merge "system_properties: do more checking of file"
# Via Android Git Automerger (1) and others
* commit '27818d2a16e4972acba15368f55a59cc0ed990f0':
  system_properties: do more checking of file
2013-01-25 14:10:01 -08:00
Elliott Hughes
7ae998456c am 6a94cb74: Merge "arm syscall : for eabi call_default don\'t use stack"
# By Matthieu Castet
# Via Gerrit Code Review (1) and Matthieu Castet (1)
* commit '6a94cb748bf63278c3271b0ab610061b0dc6f04a':
  arm syscall : for eabi call_default don't use stack
2013-01-25 14:08:26 -08:00
Nick Kralevich
27818d2a16 am b871e5d6: Merge "system_properties: do more checking of file"
# Via Gerrit Code Review (1) and Nick Kralevich (1)
* commit 'b871e5d6b3b4a214c7f19bdfca7663f1fe49fda8':
  system_properties: do more checking of file
2013-01-25 14:08:26 -08:00
Elliott Hughes
6a94cb748b Merge "arm syscall : for eabi call_default don't use stack" 2013-01-25 21:57:58 +00:00
Nick Kralevich
c16961b8c3 system_properties: do more checking of file
Check that the permissions on the properties file
are exactly as we expect them to be.

Make sure we close the fd if fstat fails.

Refactor the code slightly.

Change-Id: I5503fd58c3b8093ce7e6d05920748ed70eaf8e2c
2013-01-25 13:07:31 -08:00
Iliyan Malchev
3eaa03df03 bionic: update processed msm_vidc_enc.h
Change-Id: If9aeec6f43b8b2951d1372042c884cd0e01f0a5a
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-01-25 11:26:53 -08:00
Nick Kralevich
ddbb728eff am 151e91e6: am da2d2c61: am 82ef8296: Merge "prctl.h: include sys/cdefs.h"
# Via Android Git Automerger (2) and others
* commit '151e91e66c95a7e415903b87b8157a9bc422df45':
  prctl.h: include sys/cdefs.h
2013-01-24 16:15:39 -08:00
Nick Kralevich
151e91e66c am da2d2c61: am 82ef8296: Merge "prctl.h: include sys/cdefs.h"
# Via Android Git Automerger (1) and others
* commit 'da2d2c618c23f212f8dec0c0615bf75d7c18b88d':
  prctl.h: include sys/cdefs.h
2013-01-24 16:11:56 -08:00
Nick Kralevich
da2d2c618c am 82ef8296: Merge "prctl.h: include sys/cdefs.h"
# Via Gerrit Code Review (1) and Nick Kralevich (1)
* commit '82ef8296dc5e25b9cc8e7231f9515f50185dac9d':
  prctl.h: include sys/cdefs.h
2013-01-24 08:59:00 -08:00
Nick Kralevich
8e70b0d5c3 prctl.h: include sys/cdefs.h
prctl.h uses __BEGIN_DECLS but fails to include sys/cdefs.h
(where it's defined).  Code which includes prctl.h without
previously including sys/cdefs.h will fail to compile.

Fixed.

Change-Id: If4c9f3308f08b93596dcd00e351ae786807e9320
2013-01-23 16:49:47 -08:00
Nick Kralevich
f5b111df06 am b8726037: am e7d937b5: am b3351f12: Merge "libc: use more secure system properties if available"
* commit 'b8726037ee1100e2704e90d0a54ea2313bf96b00':
  libc: use more secure system properties if available
2013-01-23 11:12:07 -08:00
Nick Kralevich
b8726037ee am e7d937b5: am b3351f12: Merge "libc: use more secure system properties if available"
* commit 'e7d937b52f183ce84751701c369ffe6a4c81d033':
  libc: use more secure system properties if available
2013-01-23 11:09:40 -08:00
Nick Kralevich
e7d937b52f am b3351f12: Merge "libc: use more secure system properties if available"
* commit 'b3351f12047747b603efb070069e7afdf3040335':
  libc: use more secure system properties if available
2013-01-23 11:07:23 -08:00
Nick Kralevich
32417fb376 libc: use more secure system properties if available
Currently, system properties are passed via the environment
variable ANDROID_PROPERTY_WORKSPACE and a file descriptor passed
from parent to child. This is insecure for setuid executables,
as the environment variable can be changed by the caller.

Modify system property handling so that we get the properties
from a root owned properties file, rather than using an
environment variable.  Fall back to the environment variable
if the file doesn't exist.

Bug: 8045561
Change-Id: I54f3efa98cf7d63d88788da5ce0d19e34fd7851a
2013-01-23 09:28:35 -08:00
Elliott Hughes
828aaaac5e am c08ab018: am 40107623: am 778a68e1: Merge "Don\'t free anything when reporting leaks."
* commit 'c08ab018ad133a4e177013d79be547fd55968eac':
  Don't free anything when reporting leaks.
2013-01-22 22:16:11 -08:00
Elliott Hughes
9d28f5bf4a am ce8732b1: am 552e02fa: am 5c8f75ef: Merge "Disable leak checking for mksh; it\'s way too leaky."
* commit 'ce8732b188d96f4c313d20e6be17362a508f572d':
  Disable leak checking for mksh; it's way too leaky.
2013-01-22 22:16:10 -08:00
Elliott Hughes
c08ab018ad am 40107623: am 778a68e1: Merge "Don\'t free anything when reporting leaks."
* commit '40107623b05fdc2b6c61d9c885483abd3add486a':
  Don't free anything when reporting leaks.
2013-01-22 22:14:32 -08:00
Elliott Hughes
ce8732b188 am 552e02fa: am 5c8f75ef: Merge "Disable leak checking for mksh; it\'s way too leaky."
* commit '552e02fa9c99fd234c57d756358e3208d11a13ad':
  Disable leak checking for mksh; it's way too leaky.
2013-01-22 22:14:31 -08:00
Elliott Hughes
40107623b0 am 778a68e1: Merge "Don\'t free anything when reporting leaks."
* commit '778a68e1e57408be04806b5bfc3150aade44bcbf':
  Don't free anything when reporting leaks.
2013-01-22 22:11:55 -08:00
Elliott Hughes
552e02fa9c am 5c8f75ef: Merge "Disable leak checking for mksh; it\'s way too leaky."
* commit '5c8f75ef8bd89498de1d1108efa54869a2784738':
  Disable leak checking for mksh; it's way too leaky.
2013-01-22 22:11:54 -08:00
Elliott Hughes
778a68e1e5 Merge "Don't free anything when reporting leaks." 2013-01-23 06:06:21 +00:00
Elliott Hughes
848247a972 Don't free anything when reporting leaks.
We don't know that they're not going to be cleaned up by a
C++ global destructor that runs after us. This is the case with
bootanimation, for example.

Bug: 7291287
Change-Id: Iba402514d1735fdc2ae4bc95b65396d816be46c0
2013-01-22 18:36:28 -08:00
Elliott Hughes
84f8b5f401 Disable leak checking for mksh; it's way too leaky.
When each shell leaks ~240 allocations, you can't see the leaks from
the program you ran with "adb shell".

Bug: 7291287
Change-Id: Ib8780db72ba0114ebdb24768537da74bbb61f354
2013-01-22 18:35:14 -08:00
Elliott Hughes
28fa8e109e am a8e0f2b9: am b16ec162: am 28f82b26: Merge "Add const for first argument of sigismember for fit POSIX spec"
* commit 'a8e0f2b956b5a31311d778b478e63093bc2cac7a':
  Add const for first argument of sigismember for fit POSIX spec
2013-01-22 17:31:20 -08:00
Elliott Hughes
a8e0f2b956 am b16ec162: am 28f82b26: Merge "Add const for first argument of sigismember for fit POSIX spec"
* commit 'b16ec162881110a30f665ce7bd1432ccefba60b7':
  Add const for first argument of sigismember for fit POSIX spec
2013-01-22 17:29:01 -08:00
Elliott Hughes
b16ec16288 am 28f82b26: Merge "Add const for first argument of sigismember for fit POSIX spec"
* commit '28f82b260c9076aae437dafb57193a174aef1eb3':
  Add const for first argument of sigismember for fit POSIX spec
2013-01-22 17:26:45 -08:00
Elliott Hughes
28f82b260c Merge "Add const for first argument of sigismember for fit POSIX spec" 2013-01-23 01:11:28 +00:00
Elliott Hughes
7f0976ef0e am 5f79f75b: am 57edf36c: am 8d6302cd: Merge "Our strcoll(3) is no different from NetBSD\'s, so take exactly theirs."
* commit '5f79f75ba6241ca9cab42e69a68d66d1ca28e031':
  Our strcoll(3) is no different from NetBSD's, so take exactly theirs.
2013-01-22 15:36:26 -08:00
Elliott Hughes
5f79f75ba6 am 57edf36c: am 8d6302cd: Merge "Our strcoll(3) is no different from NetBSD\'s, so take exactly theirs."
* commit '57edf36c5f83fa7bcf9d8d028cde0acc7ddfadcc':
  Our strcoll(3) is no different from NetBSD's, so take exactly theirs.
2013-01-22 15:33:24 -08:00
Elliott Hughes
57edf36c5f am 8d6302cd: Merge "Our strcoll(3) is no different from NetBSD\'s, so take exactly theirs."
* commit '8d6302cdcff9c53fe3ecd36ab479fdf08318c504':
  Our strcoll(3) is no different from NetBSD's, so take exactly theirs.
2013-01-22 15:31:26 -08:00
Elliott Hughes
774cef56ee am ad551eaa: am 5f7b6b83: am 547eba0a: Merge "Avoid overflow in memccpy."
* commit 'ad551eaa0429bf5085f2901c5d367e8a54b7ed16':
  Avoid overflow in memccpy.
2013-01-22 15:23:53 -08:00
Elliott Hughes
0b9b068b3f am 0dfb2eca: am 0609c0fe: am 7af7895e: Merge "Use the new non-allocating logging for dlmalloc failures."
* commit '0dfb2ecaab681e27fa81462daec9882ebcf36edc':
  Use the new non-allocating logging for dlmalloc failures.
2013-01-22 15:23:48 -08:00
Elliott Hughes
2b47307012 Our strcoll(3) is no different from NetBSD's, so take exactly theirs.
Change-Id: I45251047202a229f9175735ecc23c0ebcda71e8d
2013-01-22 15:10:19 -08:00
Elliott Hughes
ad551eaa04 am 5f7b6b83: am 547eba0a: Merge "Avoid overflow in memccpy."
* commit '5f7b6b8301658a834516f05e8e0a9eb4513e6e62':
  Avoid overflow in memccpy.
2013-01-22 15:08:58 -08:00
Elliott Hughes
5f7b6b8301 am 547eba0a: Merge "Avoid overflow in memccpy."
* commit '547eba0a63951d7db93c0542e1ecab891725b9a8':
  Avoid overflow in memccpy.
2013-01-22 15:05:31 -08:00
Elliott Hughes
c51cd764a2 Avoid overflow in memccpy.
Just take the upstream NetBSD code.

Bug: http://code.google.com/p/android/issues/detail?id=43078
Change-Id: Ibbbde9d00e8bc6a09c9503aab2b04b4e3d1f98b0
2013-01-22 14:41:23 -08:00
Elliott Hughes
0dfb2ecaab am 0609c0fe: am 7af7895e: Merge "Use the new non-allocating logging for dlmalloc failures."
* commit '0609c0fe8dae2ec10f1811c46a4d583f557c68f7':
  Use the new non-allocating logging for dlmalloc failures.
2013-01-22 14:35:06 -08:00
Elliott Hughes
0609c0fe8d am 7af7895e: Merge "Use the new non-allocating logging for dlmalloc failures."
* commit '7af7895eeb810ff1a1ca8b60fcda13595d551114':
  Use the new non-allocating logging for dlmalloc failures.
2013-01-22 14:32:02 -08:00
Elliott Hughes
7af7895eeb Merge "Use the new non-allocating logging for dlmalloc failures." 2013-01-22 22:26:35 +00:00
Elliott Hughes
ce4cf90d79 Use the new non-allocating logging for dlmalloc failures.
Change-Id: I88afe0201ee5766a295fc5a9e710fba9d6e0d363
2013-01-22 14:24:52 -08:00
Nick Kralevich
0acf4069e9 am 98ae1a85: am e652ed30: am 244bee5b: Merge "bionic_auxv.h: fix #define conflict"
* commit '98ae1a85b057f6534bee7e52897a80694ba8b2e1':
  bionic_auxv.h: fix #define conflict
2013-01-22 13:46:31 -08:00
Nick Kralevich
98ae1a85b0 am e652ed30: am 244bee5b: Merge "bionic_auxv.h: fix #define conflict"
* commit 'e652ed30514afcf314b40c69b9cac088602a83da':
  bionic_auxv.h: fix #define conflict
2013-01-22 13:43:46 -08:00
Nick Kralevich
e652ed3051 am 244bee5b: Merge "bionic_auxv.h: fix #define conflict"
* commit '244bee5bb6e0bc12b739c57028ac8af23a18aed0':
  bionic_auxv.h: fix #define conflict
2013-01-22 13:38:53 -08:00
Nick Kralevich
25e3f4a90d Merge "Revert "libc: make system properties more secure."" 2013-01-22 21:26:18 +00:00
Nick Kralevich
abc21c8056 bionic_auxv.h: fix #define conflict
Both libc/include/sys/auxv.h and libc/private/bionic_auxv.h
use _SYS_AUXV_H_ to see if a header file has already been included.
This prevents both of these files from being included at the same
time.

Fix this name conflict.

Change-Id: Ifaec88aa9779d784b95f8e75145117acf3d5cfc5
2013-01-22 13:09:04 -08:00
Nick Kralevich
8897a9565a Revert "libc: make system properties more secure."
This reverts commit f10c5a2215.

Bug: 8045561
2013-01-22 12:44:11 -08:00
Elliott Hughes
f669fdf11e am 04afcd25: am 8ef83bc4: am 02f96b9d: Merge "Add missing extern "C"."
* commit '04afcd25a3758090009d3261f4c573b8ed73e03a':
  Add missing extern "C".
2013-01-22 11:35:50 -08:00
Elliott Hughes
04afcd25a3 am 8ef83bc4: am 02f96b9d: Merge "Add missing extern "C"."
* commit '8ef83bc46e06e8fe98e918fcb1c582d6f5807461':
  Add missing extern "C".
2013-01-22 11:34:25 -08:00
Elliott Hughes
8ef83bc46e am 02f96b9d: Merge "Add missing extern "C"."
* commit '02f96b9db0242711fe1dfe0713c0c4e698561da5':
  Add missing extern "C".
2013-01-22 11:32:16 -08:00
Elliott Hughes
f90b95ea1a Add missing extern "C".
Change-Id: Idbf24ce8482ff03f24caa89bafb08677b1c5cec3
2013-01-22 11:20:45 -08:00
Elliott Hughes
16f7b78fd1 am 4cd5703b: am 75b64a1b: am ca483765: Merge "Fix the duplication in the debugging code."
* commit '4cd5703b9eef30a32271819503808576666e1601':
  Fix the duplication in the debugging code.
2013-01-22 10:05:19 -08:00
Elliott Hughes
4cd5703b9e am 75b64a1b: am ca483765: Merge "Fix the duplication in the debugging code."
* commit '75b64a1b64e788b9e69ac4f4cd8cce37932513a8':
  Fix the duplication in the debugging code.
2013-01-22 10:02:12 -08:00
Elliott Hughes
75b64a1b64 am ca483765: Merge "Fix the duplication in the debugging code."
* commit 'ca483765bd0dc16294b9e67dd0de5c6d53b1bfa3':
  Fix the duplication in the debugging code.
2013-01-22 09:59:44 -08:00
Elliott Hughes
ca483765bd Merge "Fix the duplication in the debugging code." 2013-01-22 17:44:15 +00:00
Kito Cheng
f373b11f9f Add const for first argument of sigismember for fit POSIX spec
Change-Id: Icbc67375282f2a22dce02e4bacab15ddae846057
2013-01-20 00:15:23 +08:00
Elliott Hughes
1e980b6bc8 Fix the duplication in the debugging code.
We had two copies of the backtrace code, and two copies of the
libcorkscrew /proc/pid/maps code. This patch gets us down to one.

We also had hacks so we could log in the malloc debugging code.
This patch pulls the non-allocating "printf" code out of the
dynamic linker so everyone can share.

This patch also makes the leak diagnostics easier to read, and
makes it possible to paste them directly into the 'stack' tool (by
using relative PCs).

This patch also fixes the stdio standard stream leak that was
causing a leak warning every time tf_daemon ran.

Bug: 7291287
Change-Id: I66e4083ac2c5606c8d2737cb45c8ac8a32c7cfe8
2013-01-18 22:20:06 -08:00
Robert Greenwalt
1136b7d821 Merge "Revert "dns cache per interface iteration 2"" 2013-01-19 00:40:38 +00:00
Robert Greenwalt
b002a2ff77 Revert "dns cache per interface iteration 2"
This reverts commit f1464ff956

Change-Id: I3496b9a8cb54614fe3eea016d1391c8a89f3db38
2013-01-19 00:40:24 +00:00
Nick Kralevich
f10c5a2215 libc: make system properties more secure.
Currently, system properties are passed via the environment
variable ANDROID_PROPERTY_WORKSPACE and a file descriptor passed
from parent to child. This is insecure for setuid executables,
as the environment variable can be changed by the caller.

Modify system property handling so that we get the properties
from a root owned properties file, rather than using an
environment variable.

Related to bug: 8029617

Change-Id: I5717e51f20f9e4339ed0a1fdf2fc797e52670fbb
2013-01-18 14:30:07 -08:00
Nick Kralevich
c5c99adeed am 8e833972: am 0a0c2321: am 4bfaf1e5: Merge "FORTIFY_SOURCE: optimize"
* commit '8e833972c2506267024136a0f609bdbb26dcc498':
  FORTIFY_SOURCE: optimize
2013-01-17 17:08:21 -08:00
Nick Kralevich
8e833972c2 am 0a0c2321: am 4bfaf1e5: Merge "FORTIFY_SOURCE: optimize"
* commit '0a0c23216766adf76739dc38dcb45934105cd41c':
  FORTIFY_SOURCE: optimize
2013-01-17 17:06:11 -08:00
Nick Kralevich
0a0c232167 am 4bfaf1e5: Merge "FORTIFY_SOURCE: optimize"
* commit '4bfaf1e5f62748b305406ff4ceebd5f4b750038c':
  FORTIFY_SOURCE: optimize
2013-01-17 17:04:33 -08:00
Elliott Hughes
e230306135 am a4723742: am 261e9d08: am e4ca88d9: Merge "Add functionlity to the scripts to replace tokens in kernel headers based on architecture."
* commit 'a4723742c1ee0daa2ec17a148334c548b5edf3a8':
  Add functionlity to the scripts to replace tokens in kernel headers based on architecture.
2013-01-17 16:53:57 -08:00
Elliott Hughes
a4723742c1 am 261e9d08: am e4ca88d9: Merge "Add functionlity to the scripts to replace tokens in kernel headers based on architecture."
* commit '261e9d08dbf1cd7fea7e1799338238d11d18cb7c':
  Add functionlity to the scripts to replace tokens in kernel headers based on architecture.
2013-01-17 16:51:09 -08:00
Nick Kralevich
4bfaf1e5f6 Merge "FORTIFY_SOURCE: optimize" 2013-01-18 00:49:36 +00:00
Elliott Hughes
261e9d08db am e4ca88d9: Merge "Add functionlity to the scripts to replace tokens in kernel headers based on architecture."
* commit 'e4ca88d9fa8757e4fb4056fcafa5bc15b406a2fd':
  Add functionlity to the scripts to replace tokens in kernel headers based on architecture.
2013-01-17 16:48:45 -08:00
Nick Kralevich
a44e9afdd1 FORTIFY_SOURCE: optimize
Don't do the fortify_source checks if we can determine, at
compile time, that the provided operation is safe.

This avoids silliness like calling fortify source on things like:

  size_t len = strlen("asdf");
  printf("%d\n", len);

and allows the compiler to optimize this code to:

  printf("%d\n", 4);

Defer to gcc's builtin functions instead of pointing our code
to the libc implementation.

Change-Id: I5e1dcb61946461c4afaaaa983e39f07c7a0df0ae
2013-01-17 15:41:33 -08:00
Raghu Gandham
a864c2c234 Add functionlity to the scripts to replace tokens in kernel headers
based on architecture.
2013-01-17 14:39:09 -08:00
Robert Greenwalt
89f9b30e4d Merge "dns cache per interface iteration 2" 2013-01-17 16:14:52 +00:00
Nick Kralevich
927d904d52 am 91bc5865: am 8d01c055: am 1271cdc1: Merge "Revert "stack protector: use AT_RANDOM""
* commit '91bc5865a333212e7cac934b0a2ac7c522911d58':
  Revert "stack protector: use AT_RANDOM"
2013-01-16 13:58:04 -08:00
Nick Kralevich
91bc5865a3 am 8d01c055: am 1271cdc1: Merge "Revert "stack protector: use AT_RANDOM""
* commit '8d01c0557bb2b7ea30f4038b6c84b816800073a7':
  Revert "stack protector: use AT_RANDOM"
2013-01-16 13:55:55 -08:00
Nick Kralevich
8d01c0557b am 1271cdc1: Merge "Revert "stack protector: use AT_RANDOM""
* commit '1271cdc1c91c6ae688917bc8f4ae59d2a97b3e99':
  Revert "stack protector: use AT_RANDOM"
2013-01-16 13:53:25 -08:00
Nick Kralevich
bcd18c0485 am 27ff1ae4: am de666485: am ba117e41: Merge "stack protector: use AT_RANDOM"
* commit '27ff1ae414915789b27d0a485ff6d856ae742aad':
  stack protector: use AT_RANDOM
2013-01-16 13:34:46 -08:00
Nick Kralevich
27ff1ae414 am de666485: am ba117e41: Merge "stack protector: use AT_RANDOM"
* commit 'de666485b8123ac35be94109336f7c56a7e9e3c2':
  stack protector: use AT_RANDOM
2013-01-16 13:31:24 -08:00
Nick Kralevich
36bd371e26 Revert "stack protector: use AT_RANDOM"
The AT_RANDOM changes broke setuid / setgid executables
such as "ping". When the linker executes a setuid program,
it cleans the environment, removing any invalid environment
entries, and adding "NULL"s to the end of the environment
array for each removed variable. Later on, we try to determine
the location of the aux environment variable, and get tripped
up by these extra NULLs.

Reverting this patch will get setuid executables working again,
but getauxval() is still broken for setuid programs because of
this bug.

This reverts commit e3a49a8661.

Change-Id: I05c58a896b1fe32cfb5d95d43b096045cda0aa4a
2013-01-16 13:16:42 -08:00
Nick Kralevich
de666485b8 am ba117e41: Merge "stack protector: use AT_RANDOM"
* commit 'ba117e4172fe6f160bf5f4d58b37e12c08c34245':
  stack protector: use AT_RANDOM
2013-01-16 11:31:00 -08:00
Elliott Hughes
b989c9ceda Revert "DO NOT MERGE Revert "Add the libcutils localtime_tz and mktime_t extensions to bionic.""
This reverts commit f4b34b6c39.
2013-01-16 10:34:33 -08:00
Nick Kralevich
e3a49a8661 stack protector: use AT_RANDOM
Populate the stack canaries from the kernel supplied
AT_RANDOM value, which doesn't involve any system calls.
This is slightly faster (6 fewer syscalls) and avoids
unnecessarily reading /dev/urandom, which depletes entropy.

Bug: 7959813

Change-Id: If2b43100a2a9929666df3de56b6139fed969e0f1
2013-01-16 10:09:52 -08:00
Elliott Hughes
1a18895ebc am e05709b1: am e611fad0: am 14e1975e: Merge "Fix signalfd for MIPS."
* commit 'e05709b1df7dba98c37e83f84dcbd2ad8429bcfc':
  Fix signalfd for MIPS.
2013-01-16 09:50:42 -08:00
Elliott Hughes
e611fad0d0 am 14e1975e: Merge "Fix signalfd for MIPS."
* commit '14e1975e13c197180ed0481f305f83a362b16a24':
  Fix signalfd for MIPS.
2013-01-16 09:45:57 -08:00
Elliott Hughes
f193b9fc21 Fix signalfd for MIPS.
Also mark signalfd's sigset_t* argument as non-nullable.

Change-Id: I466e09cdf3fb92480744c496da92274a97f99dd1
2013-01-16 09:40:25 -08:00
Matthieu Castet
faa0fdb119 arm syscall : for eabi call_default don't use stack
In the default case, we don't need to use the stack, we can save r7 with
ip register (that what does eglibc).

This allow to fix vfork data corruption
(see 3884bfe966), because vfork now don't
use the stack.
2013-01-16 14:53:37 +01:00
Elliott Hughes
acb907fb0d Revert "DO NOT MERGE Revert "Add the libcutils localtime_tz and mktime_t extensions to bionic.""
This reverts commit f4b34b6c39.

The revert was only meant to apply to the jb-mr1 branch, but accidentally
leaked out into AOSP. This revert-revert gets AOSP master and internal
master back in sync.
2013-01-15 11:12:18 -08:00
Ben Cheng
4130af46bf am b09d7d86: Merge "Add __aeabi_idiv to the dummy reference list."
* commit 'b09d7d86004ab75b774358454d8ee261987af96b':
  Add __aeabi_idiv to the dummy reference list.
2013-01-14 15:44:01 -08:00
Ben Cheng
35f5385aa5 Add __aeabi_idiv to the dummy reference list.
If the platform code is compiled with -mcpu=cortex-a15, then without this
change prebuilt libraries built against -march=armv7 cannot resolve the
dependency on __aeabi_idiv (provided by libgcc.a).

Bug: 7961327

cherry-picked from internal master.

Change-Id: I8fe59a98eb53d641518b882523c1d6a724fb7e55
2013-01-14 15:33:40 -08:00
Nick Kralevich
9e22af2363 am 1519690c: am 29fe857e: Merge "headers: update auxvec.h from Linux kernel"
* commit '1519690cfb27af79627a8d39bf158a1feca953e3':
  headers: update auxvec.h from Linux kernel
2013-01-14 14:38:36 -08:00
Nick Kralevich
1519690cfb am 29fe857e: Merge "headers: update auxvec.h from Linux kernel"
* commit '29fe857ec80e59347e28458a5396eb68d1cba0e4':
  headers: update auxvec.h from Linux kernel
2013-01-14 14:31:28 -08:00
Ben Cheng
86050b9e92 Merge "Add __aeabi_idiv to the dummy reference list." 2013-01-14 13:36:33 -08:00
Nick Kralevich
a67e4de662 headers: update auxvec.h from Linux kernel
Pull a new version of auxvec.h from the upstream Linux
kernel at commit b719f43059903820c31edb30f4663a2818836e7f

These files were generated using the following commands:

cd bionic/libc/kernel
./tools/clean_header.py -u ../../../external/kernel-headers/original/uapi/linux/auxvec.h
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/auxvec.h
./tools/clean_header.py -u ../../../external/kernel-headers/original/asm-x86/auxvec.h

This change is needed to get AT_RANDOM defined.

Change-Id: Ib064649684b17af6ff4b1a31d501a05f78bb81d0
2013-01-14 11:49:59 -08:00
Ben Cheng
a4e964d200 Add __aeabi_idiv to the dummy reference list.
If the platform code is compiled with -mcpu=cortex-a15, then without this
change prebuilt libraries built against -march=armv7 cannot resolve the
dependency on __aeabi_idiv (provided by libgcc.a).

Bug: 7961327

Change-Id: I0a05ce9c44e44d39b8ce1f0e319e2d37a010f3c7
2013-01-14 11:27:29 -08:00
Ian Rogers
7f7f232f4a am 763d4bb3: am 68fa57f0: Merge "Name anonymous mmap mallocs."
* commit '763d4bb345b2e8882dd39d0656ee9f23ca1d0512':
  Name anonymous mmap mallocs.
2013-01-14 11:22:56 -08:00
Ian Rogers
763d4bb345 am 68fa57f0: Merge "Name anonymous mmap mallocs."
* commit '68fa57f000285af20100c00db3d2bc143ad32294':
  Name anonymous mmap mallocs.
2013-01-14 11:19:00 -08:00
Ian Rogers
68fa57f000 Merge "Name anonymous mmap mallocs." 2013-01-14 10:54:44 -08:00
Nick Kralevich
1165da8390 am 13bd3716: am bb897fa9: Merge "libc_init_static: apply relro earlier."
* commit '13bd37160ee340ddcf7e1fb57251b124e0ec69c1':
  libc_init_static: apply relro earlier.
2013-01-14 10:34:45 -08:00
Nick Kralevich
13bd37160e am bb897fa9: Merge "libc_init_static: apply relro earlier."
* commit 'bb897fa9f79d25e4445fe3ab46b86657d6660c10':
  libc_init_static: apply relro earlier.
2013-01-14 10:25:16 -08:00
Nick Kralevich
9fb48ac257 libc_init_static: apply relro earlier.
The dynamic linker applies relro before the preinit and init
arrays are executed, so we should be consistent for statically
linked executables.

Change-Id: Ia0a49d0e981a6e8791f74eed00280edf576ba139
2013-01-11 18:38:26 -08:00
Ian Rogers
8921060253 Name anonymous mmap mallocs.
Change-Id: Icc53ba1eecb8445210623826d8e99a611d686f7f
2013-01-11 17:42:17 -08:00
Nick Kralevich
8ffe08c86b am fdd6dfa8: am 2c5153b0: libc: add getauxval()
* commit 'fdd6dfa863ea73251b5d59990e239854c31ecee3':
  libc: add getauxval()
2013-01-11 17:04:04 -08:00