OSDN Git Service
Elliott Hughes [Wed, 6 Apr 2016 21:02:34 +0000 (21:02 +0000)]
Merge "Fix b64_pton."
Elliott Hughes [Wed, 6 Apr 2016 18:56:41 +0000 (11:56 -0700)]
Fix b64_pton.
This was fixed upstream years ago. While we're here, let's switch to the
OpenBSD copy (because that's our majority upstream BSD, not because they
found and fixed this bug first).
Bug: http://b/
28035006
Change-Id: I53dd915a8122bfd7a6d58f01f9902d1586a47e23
Elliott Hughes [Wed, 6 Apr 2016 18:08:34 +0000 (18:08 +0000)]
Merge "Add <sys/quota.h>."
Elliott Hughes [Wed, 6 Apr 2016 06:01:42 +0000 (23:01 -0700)]
Add <sys/quota.h>.
It turns out that at least the Nexus 9 kernel is built without CONFIG_QUOTA.
If we decide we're going to mandate quota functionality, I'm happy for us to
be a part of CTS that ensures that happens, but I don't want to be first, so
there's not much to test here other than "will it compile?". The strace
output looks right though.
Bug: http://b/
27948821
Bug: http://b/
27952303
Change-Id: If667195eee849ed17c8fa9110f6b02907fc8fc04
Elliott Hughes [Wed, 6 Apr 2016 17:00:45 +0000 (17:00 +0000)]
Merge "Rename the <grp.h>/<pwd.h> tests to reflect that they're no longer in stubs.cpp."
Elliott Hughes [Wed, 6 Apr 2016 16:47:33 +0000 (16:47 +0000)]
Merge "Break up the rest of stubs.cpp."
Elliott Hughes [Wed, 6 Apr 2016 15:38:21 +0000 (08:38 -0700)]
Rename the <grp.h>/<pwd.h> tests to reflect that they're no longer in stubs.cpp.
Bug: http://b/
27999086
Change-Id: I3255ad5861a705beeb9b462e22f79ae1e5a85a79
Elliott Hughes [Wed, 6 Apr 2016 15:34:58 +0000 (08:34 -0700)]
Break up the rest of stubs.cpp.
Bug: http://b/
27999086
Change-Id: Ibcc2c5171d43ebd26b486642052738473f3b7714
Mark Salyzyn [Wed, 6 Apr 2016 15:05:41 +0000 (15:05 +0000)]
Merge "bionic: split out getpwnam and friends"
Mark Salyzyn [Tue, 5 Apr 2016 16:09:46 +0000 (09:09 -0700)]
bionic: split out getpwnam and friends
- added grp_pwd.cpp containing POSIX passwd and group functions,
colocated because they share with the Android ID (AID) roots.
- stubs.cpp contains all the truly empty functions (network and
protocol accessors)
Bug:
27999086
Change-Id: I036f9e2dd246f48302cb7c97d23176fa24d19c33
Pierre Imai [Wed, 6 Apr 2016 03:01:51 +0000 (03:01 +0000)]
Merge "Reduce the amount of logging in Bionic's resolver."
Pierre Imai [Wed, 6 Apr 2016 02:23:47 +0000 (11:23 +0900)]
Reduce the amount of logging in Bionic's resolver.
Change-Id: I250d9a352f1fa0cafef349d0e23f72a9dd8e399d
Dimitry Ivanov [Wed, 6 Apr 2016 00:38:23 +0000 (00:38 +0000)]
Merge "Do not test ifunc on mips"
Dimitry Ivanov [Wed, 6 Apr 2016 00:12:01 +0000 (17:12 -0700)]
Do not test ifunc on mips
This commit fixes mips build
Bug: http://b/
28009632
Change-Id: I5c657b31947791aea4cc02a2fc4ede6d0ecde851
Dimitry Ivanov [Wed, 6 Apr 2016 00:15:02 +0000 (00:15 +0000)]
Merge "linker: Add unit-test for sleb128_decoder"
Dimitry Ivanov [Tue, 5 Apr 2016 20:29:50 +0000 (13:29 -0700)]
linker: Add unit-test for sleb128_decoder
Add missing test for sleb128_decoder. Also remove
dependency to static library because it exposes malloc/free
which interfere with libc.so malloc/free causing test to crash.
Change-Id: Iedd3268011df9f67ed58c0b58c71f34e30370b23
Elliott Hughes [Tue, 5 Apr 2016 23:38:37 +0000 (23:38 +0000)]
Merge "Add sync_file_range to <fcntl.h>."
Elliott Hughes [Tue, 5 Apr 2016 18:56:03 +0000 (11:56 -0700)]
Add sync_file_range to <fcntl.h>.
Bug: http://b/
27952303
Change-Id: Idadfacd657ed415abc11684b9471e4e24c2fbf05
Elliott Hughes [Tue, 5 Apr 2016 18:50:09 +0000 (18:50 +0000)]
Merge "Add missing prototype for readahead in <fcntl.h>."
Elliott Hughes [Tue, 5 Apr 2016 18:06:02 +0000 (11:06 -0700)]
Add missing prototype for readahead in <fcntl.h>.
Change-Id: Icfe85e9cf95c657b495c4e9cd10dec50b0b8f6db
Elliott Hughes [Tue, 5 Apr 2016 18:03:56 +0000 (18:03 +0000)]
Merge "Add POSIX getsubopt(3)."
Elliott Hughes [Tue, 5 Apr 2016 17:01:23 +0000 (17:01 +0000)]
Merge "Add SysV signal handling"
Pierre Imai [Tue, 5 Apr 2016 07:35:46 +0000 (07:35 +0000)]
Merge "Fix off-by-one error in res_cache.c"
Pierre Imai [Tue, 5 Apr 2016 06:49:08 +0000 (15:49 +0900)]
Fix off-by-one error in res_cache.c
Change-Id: I58264902c123b3bc0d392d17837aa537ca0a3ca2
Pierre Imai [Tue, 5 Apr 2016 03:44:35 +0000 (03:44 +0000)]
Merge "Ignore unreliable DNS servers."
Pierre Imai [Mon, 22 Feb 2016 08:50:41 +0000 (17:50 +0900)]
Ignore unreliable DNS servers.
Collect statistics about DNS query success state and delay. Ignore
servers that have been tried at least five times and have a success rate
of < 0.25. Retry these servers once every 180s.
Bug:
25731675
Change-Id: I78e24f43e388dca82fb81835e1796f4c7dce8da3
Elliott Hughes [Tue, 5 Apr 2016 00:36:08 +0000 (00:36 +0000)]
Merge "Make it harder to use a broken legacy function by accident."
Elliott Hughes [Tue, 5 Apr 2016 00:34:04 +0000 (17:34 -0700)]
Add POSIX getsubopt(3).
Bug: http://b/
27952303
Change-Id: I8a816477545dadcbd5c055714e76263574446b6f
Yabin Cui [Tue, 5 Apr 2016 00:08:05 +0000 (00:08 +0000)]
Merge "Format code to calculate thread stack and signal stack."
Greg Hackmann [Mon, 29 Feb 2016 20:35:33 +0000 (12:35 -0800)]
Add SysV signal handling
Implement the legacy SysV signal handling functions sighold(),
sigignore(), sigpause(), sigrelse(), and sigset() in terms of the newer
POSIX signal APIs. As of POSIX 2013 the SysV signal APIs are deprecated
but still required.
Change-Id: I4ca40e3d706605a7d1a30dc76c78b2b24586387d
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Yabin Cui [Thu, 31 Mar 2016 00:48:50 +0000 (17:48 -0700)]
Format code to calculate thread stack and signal stack.
The code to calculate thread stack and signal stack looks weird:
the thread stack size and signal stack size are related with
each other on 32-bit mode, but not on 64-bit mode. So change the
code to make the logic more resonable. This doesn't change anything
as we have defined SIGSTKSZ to 16K on arm64.
Bug:
28005110
Change-Id: I04d2488cfb96ee7e2d894d062c66cef950fec418
Elliott Hughes [Mon, 4 Apr 2016 23:15:37 +0000 (16:15 -0700)]
Make it harder to use a broken legacy function by accident.
This function only exists for backwards compatibility, so leave it as it was.
Bug: http://b/
26944282
Change-Id: I31973d1402660933103ee2d815649ab9569e4dfc
Dan Willemsen [Mon, 4 Apr 2016 21:14:01 +0000 (21:14 +0000)]
Merge "Update Android.bp with recent Android.mk changes"
Dimitry Ivanov [Mon, 4 Apr 2016 20:25:21 +0000 (20:25 +0000)]
Merge "Enable ifunc test for arm"
Dan Willemsen [Mon, 4 Apr 2016 20:18:46 +0000 (13:18 -0700)]
Update Android.bp with recent Android.mk changes
This ports Idb3d445e053c44180773f59774df19b324f6817f to Android.bp
Change-Id: Id5cdb450330792810b8eb61b3cab115ef046e55d
Elliott Hughes [Mon, 4 Apr 2016 19:46:18 +0000 (19:46 +0000)]
Merge "Remove a workaround from stack_protector_test that's not needed in "
Elliott Hughes [Mon, 4 Apr 2016 18:41:05 +0000 (18:41 +0000)]
Merge "Move math headers in with the other headers."
Dimitry Ivanov [Wed, 30 Mar 2016 23:44:48 +0000 (16:44 -0700)]
Enable ifunc test for arm
Bug: http://b/
27930475
Change-Id: I1f9e7c5b9ffabfd77ae6ebd534938aef39ec7987
Dimitry Ivanov [Mon, 4 Apr 2016 16:49:21 +0000 (16:49 +0000)]
Merge "Revert "[MIPS] Link .dex or .oat code lacking .MIPS.abiflags segment""
Nick Kralevich [Sun, 3 Apr 2016 16:20:25 +0000 (16:20 +0000)]
Merge "tests: allow brk to fail with ENOMEM"
Daniel Micay [Thu, 31 Dec 2015 13:04:53 +0000 (08:04 -0500)]
tests: allow brk to fail with ENOMEM
Any caller of brk needs to handle failure by falling back to mmap as
there's no guarantee that other mappings are not placed above the brk
heap. Since jemalloc starts with mmap in the first place and dlmalloc
knows how to fall back to mmap, it's already a legacy API in Android.
Forcing it to succeed rules out stronger ASLR implementations where the
brk heap might not have any room to grow. It's also valid for the brk
implementation to simply return -1 with errno set to ENOMEM in every
case and that's a good way of finding anything relying on it. It would
make sense for it to be an optional kernel feature.
The brk heap is also not guaranteed to be initially page aligned. PaX
ASLR randomizes the internal bits. It was only mentioned in a comment to
explain the design of the test though.
Bug:
24233096
Change-Id: I16e9bc8677e796c73915b830b99b0ce39c02b31d
Elliott Hughes [Sat, 2 Apr 2016 15:36:33 +0000 (08:36 -0700)]
Move math headers in with the other headers.
Keeping them separate is a pain for the NDK, and doesn't help the platform.
Change-Id: I96b8beef307d4a956e9c0a899ad9315adc502582
Elliott Hughes [Sat, 2 Apr 2016 04:02:25 +0000 (21:02 -0700)]
Remove a workaround from stack_protector_test that's not needed in
The compiler in master doesn't leave a gap between the buffer and the stack
guard canary.
Bug: http://b/
27815668
Change-Id: Iae6681683881055c2719d661a2179f5305c23135
Elliott Hughes [Sat, 2 Apr 2016 04:01:54 +0000 (04:01 +0000)]
Merge "Fix the stack-protector test for x86/x86-64."
Elliott Hughes [Fri, 1 Apr 2016 21:51:10 +0000 (14:51 -0700)]
Fix the stack-protector test for x86/x86-64.
Built for fugu this was working fine, but built for generic x86/x86-64
the compiler was (a) optimizing out all the stack writes and (b) inserting
enough padding on x86-64 for the canary to be safely out of the way.
While here, let's tighten up this test so we test that it's sufficient to
only overwrite the buffer by one byte...
(cherry-pick of
6f90c1ac59eb4e7811b7b0e408615049c935c0a9.)
Bug: http://b/
27815668
Change-Id: I80a646de4b30fd5c78df20fdaa7e3eb163585caf
Elliott Hughes [Fri, 1 Apr 2016 20:30:11 +0000 (20:30 +0000)]
Merge "Ensure only mips is using GCC to build bionic."
Yabin Cui [Fri, 1 Apr 2016 17:56:33 +0000 (17:56 +0000)]
Merge "Check current pid at libc initialization for 32-bit build."
Elliott Hughes [Fri, 1 Apr 2016 17:54:27 +0000 (10:54 -0700)]
Ensure only mips is using GCC to build bionic.
MIPS still have ld128 and 16-bit atomics issues with clang, so we can't
just remove this yet.
Bug: http://b/
25291096
Change-Id: I2645ebf3af04e1a4008d70da780c04240e3d7a85
Elliott Hughes [Fri, 1 Apr 2016 17:26:53 +0000 (17:26 +0000)]
Merge "Tell GCC that sometimes we have to build deprecated functions."
Elliott Hughes [Fri, 1 Apr 2016 17:25:19 +0000 (10:25 -0700)]
Tell GCC that sometimes we have to build deprecated functions.
We're the C library. Nothing could be more deprecated.
bionic/libc/bionic/pthread_cond.cpp:243:10: error: 'int pthread_cond_timedwait_relative_np(pthread_cond_t*, pthread_mutex_t*, const timespec*)' is deprecated (declared at bionic/libc/bionic/pthread_cond.cpp:227): use pthread_cond_timedwait instead [-Werror=deprecated-declarations]
return pthread_cond_timedwait_relative_np(cond_interface, mutex, &ts);
^
bionic/libc/bionic/pthread_cond.cpp:243:71: error: 'int pthread_cond_timedwait_relative_np(pthread_cond_t*, pthread_mutex_t*, const timespec*)' is deprecated (declared at bionic/libc/bionic/pthread_cond.cpp:227): use pthread_cond_timedwait instead [-Werror=deprecated-declarations]
return pthread_cond_timedwait_relative_np(cond_interface, mutex, &ts);
^
Change-Id: Idb3d445e053c44180773f59774df19b324f6817f
Elliott Hughes [Fri, 1 Apr 2016 16:43:42 +0000 (16:43 +0000)]
Merge "Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE."
Elliott Hughes [Fri, 1 Apr 2016 02:11:49 +0000 (02:11 +0000)]
Merge "Differentiate the MNTTYPE_* and MNTOPT_* constants."
Elliott Hughes [Fri, 1 Apr 2016 01:20:01 +0000 (18:20 -0700)]
Differentiate the MNTTYPE_* and MNTOPT_* constants.
Bug: http://b/
27952303
Change-Id: I926593c16143f76b21a65af7f6e1979d0fb44cac
Elliott Hughes [Fri, 1 Apr 2016 01:14:23 +0000 (01:14 +0000)]
Merge "Add a few missing types and constants to headers."
Elliott Hughes [Fri, 1 Apr 2016 00:05:30 +0000 (17:05 -0700)]
Add a few missing types and constants to headers.
This (and other stuff still to come) prevented xfstests from building out
of the box.
Bug: http://b/
27952303
Change-Id: Id38fd37386d43fc351c56dca18785a465e3e6145
Yabin Cui [Tue, 29 Mar 2016 19:25:12 +0000 (12:25 -0700)]
Check current pid at libc initialization for 32-bit build.
Although there is a test pthread.pthread_mutex_owner_tid_limit
to check pid_max, but bionic-unit-tests hangs before reaching
that test. So abort at libc initialization if not able to reach
the test when running bionic-unit-tests32. It is more friendly
for debugging.
Bug:
24016357
Change-Id: Ia70c2e36fd8a3a040d41ea5722c7b48a6134e102
Elliott Hughes [Wed, 30 Mar 2016 17:33:54 +0000 (10:33 -0700)]
Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE.
Bug: http://b/
27918161
Change-Id: I21d4dfa4636aa06a93b3c8a215113f66f37f0bc7
Josh Gao [Wed, 30 Mar 2016 02:27:00 +0000 (02:27 +0000)]
Merge "Add a checksum to jmp_buf on mips and mips64."
Josh Gao [Wed, 30 Mar 2016 00:58:30 +0000 (00:58 +0000)]
Merge changes from topic 'setjmp_checksum_x86'
* changes:
Add a checksum to jmp_buf on x86_64.
Delete lies from x86_64 setjmp implementation.
Add a checksum to jmp_buf on x86.
Josh Gao [Tue, 29 Mar 2016 21:53:26 +0000 (14:53 -0700)]
Add a checksum to jmp_buf on x86_64.
Bug: http://b/
27856501
Bug: http://b/
27417786
Change-Id: I541f5a7ce4972ef56b3f69e73927ca7df362609a
Josh Gao [Tue, 29 Mar 2016 21:34:03 +0000 (14:34 -0700)]
Delete lies from x86_64 setjmp implementation.
Previously, the implementation of setjmp on x86_64 claimed that
sigprocmask would write to two longs' worth of bytes.
Bug: http://b/
27856501
Change-Id: I9f32b40ac773a0cd91a976aace5bfba6e67fb0f8
Josh Gao [Tue, 29 Mar 2016 21:03:09 +0000 (14:03 -0700)]
Add a checksum to jmp_buf on x86.
Bug: http://b/
27856501
Bug: http://b/
27417786
Change-Id: Id5a0a81fc38e311bff678cbc7dc2219bc0074503
Yabin Cui [Tue, 29 Mar 2016 23:44:59 +0000 (23:44 +0000)]
Merge "Fix test getauxval.arm_has_AT_HWCAP2."
Dan Willemsen [Tue, 29 Mar 2016 23:36:41 +0000 (23:36 +0000)]
Merge "Update Android.bp with getdomainname"
Yabin Cui [Tue, 29 Mar 2016 22:41:49 +0000 (15:41 -0700)]
Fix test getauxval.arm_has_AT_HWCAP2.
Bug:
27874785
Change-Id: Ibb39087c5353a0cca7783d39498b370e478fe91c
Dan Willemsen [Tue, 29 Mar 2016 22:21:38 +0000 (15:21 -0700)]
Update Android.bp with getdomainname
Change-Id: I32383162acd16430089708fdce8927be43d1bc5a
Dimitry Ivanov [Mon, 28 Mar 2016 22:32:31 +0000 (22:32 +0000)]
Merge "linker: hide the pointer to soinfo"
Dimitry Ivanov [Thu, 24 Mar 2016 22:30:30 +0000 (15:30 -0700)]
linker: hide the pointer to soinfo
Handle no longer is a pointer to soinfo of
a corresponding library. This is done to
prevent access to linker internal fields.
Bug: http://b/
25593965
Change-Id: I62bff0d0e5b2dc842e6bf0babb30fcc4c000be24
Elliott Hughes [Mon, 28 Mar 2016 19:33:48 +0000 (19:33 +0000)]
Merge "Don't bother insisting on AT_HWCAP2 for 32-bit devices."
Greg Hackmann [Mon, 28 Mar 2016 19:19:15 +0000 (19:19 +0000)]
Merge "clock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case"
Elliott Hughes [Mon, 28 Mar 2016 18:53:12 +0000 (11:53 -0700)]
Don't bother insisting on AT_HWCAP2 for 32-bit devices.
Bug: http://b/
27874785
Change-Id: I9dcf345ae1221f665f267cba3ed9279435671b75
Greg Hackmann [Sat, 26 Mar 2016 18:37:55 +0000 (11:37 -0700)]
clock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case
POSIX makes "the CPU-time clock of the calling thread" (i.e.,
CLOCK_THREAD_CPUTIME_ID) a special case which returns EINVAL instead of
ENOTSUP.
However, the clock_nanosleep syscall treats this clock just like any
other, and returns -EOPNOTSUPP to indicate an unimplemented nanosleep
handler. So we need to handle this ourselves in userspace.
This change fixes the LTP clock_nanosleep01 testcase.
Change-Id: If3bed940d276834bcd114d8c17f96197e9384711
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Predrag Blagojevic [Wed, 16 Mar 2016 14:49:12 +0000 (15:49 +0100)]
Add a checksum to jmp_buf on mips and mips64.
Make it easier to diagnose applications mucking with the contents of
jmp_buf by checksumming its contents.
Bug: http://b/
27417786
Change-Id: I473bc2871dece23a9b9d02481945246160d671c6
Nick Kralevich [Mon, 28 Mar 2016 00:27:05 +0000 (00:27 +0000)]
Merge "fixup x86 setdomainname.S"
Nick Kralevich [Sun, 27 Mar 2016 21:52:58 +0000 (14:52 -0700)]
fixup x86 setdomainname.S
Both
be910529322b461148debefd50b9e0d67ae84f8e and
e2faf07d659b1c824002e50b9cdfa9caae62a31b were submitted about
two days ago. The former changed how the syscalls stubs were
generated, but the latter was submitted using the old stub
format.
Use the new stub format for setdomainname.S
Change-Id: I578acd7053f57a275f6831dd2404ef04826c578e
Greg Hackmann [Fri, 25 Mar 2016 22:43:00 +0000 (22:43 +0000)]
Merge "Add hasmntopt(3)"
Elliott Hughes [Fri, 25 Mar 2016 22:20:42 +0000 (22:20 +0000)]
Merge "libc: implement kernel vdso syscalls for i386"
Greg Hackmann [Fri, 25 Mar 2016 22:02:06 +0000 (22:02 +0000)]
Merge "Add {get,set}domainname(2)"
Greg Hackmann [Fri, 4 Mar 2016 18:07:35 +0000 (10:07 -0800)]
Add hasmntopt(3)
bionic has the Linux-specific mntent.h but is missing hasmntopt().
Change-Id: I0ab7b83626c969704add4e64b37a6fc715d4a723
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Greg Hackmann [Thu, 3 Mar 2016 16:37:53 +0000 (08:37 -0800)]
Add {get,set}domainname(2)
{get,set}domainname aren't in POSIX but are widely-implemented
extensions.
The Linux kernel provides a setdomainname syscall but not a symmetric
getdomainname syscall, since it expects userspace to get the domain name
from uname(2).
Change-Id: I96726c242f4bb646c130b361688328b0b97269a0
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Mingwei Shi [Thu, 12 Nov 2015 07:02:14 +0000 (07:02 +0000)]
libc: implement kernel vdso syscalls for i386
This patch uses __kernel_vsyscall instead of "int 0x80"
as the syscall entry point. AT_SYSINFO points to
an adapter to mask the arch specific difference and gives a
performance boost on i386 architecture.
Change-ID: Ib340c604d02c6c25714a95793737e3cfdc3fc5d7
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
Greg Hackmann [Fri, 25 Mar 2016 19:35:01 +0000 (19:35 +0000)]
Merge "epoll_create: reject size <= 0"
Greg Hackmann [Fri, 25 Mar 2016 19:34:44 +0000 (19:34 +0000)]
Merge "clone: check for NULL child stack"
Elliott Hughes [Fri, 25 Mar 2016 18:02:42 +0000 (18:02 +0000)]
Merge "Fix x86 __memset_chk."
Elliott Hughes [Fri, 25 Mar 2016 17:31:54 +0000 (17:31 +0000)]
Merge "Fix the AT_HWCAP2 test."
Elliott Hughes [Fri, 25 Mar 2016 15:29:05 +0000 (08:29 -0700)]
Fix the AT_HWCAP2 test.
"I have none of these capabilities" is a legitimate response, and
distinct from "I don't know what my capabilities are". It's the latter
I meant to test for.
Bug: http://b/
27810985
Change-Id: Id165423e62390051cbf23fdda54f28d94566cbe7
Elliott Hughes [Fri, 25 Mar 2016 05:34:47 +0000 (22:34 -0700)]
Fix x86 __memset_chk.
The stack offsets assumed we'd pushed %ebx. Unlike x86-64 we can't fall
through, but we can avoid repeating work we've already done.
Change-Id: I7e5f9be50983ed6178dd0c0534042da7ea30ad0c
Greg Hackmann [Thu, 24 Mar 2016 20:41:17 +0000 (13:41 -0700)]
epoll_create: reject size <= 0
Even though the size parameter to epoll_create(2) is (otherwise) unused,
passing in size <= 0 is explicitly documented as an error.
This change fixes the LTP epoll01 testcase.
Change-Id: I044a38be823c2fa956b57e77cc66571dfae8a4bb
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Greg Hackmann [Thu, 24 Mar 2016 00:15:02 +0000 (17:15 -0700)]
clone: check for NULL child stack
The clone syscall accepts NULL child stacks, interpreting this to mean
the child gets a copy of the parent's stack with copy-on-write
semantics. However clone(2) is explicitly documented to treat this an
an error.
"Fortunately" every architecture's __bionic_clone implementation pushes
something onto the child stack before making the clone syscall. So we
know fixing this won't break legacy apps, because any app that tried
using a NULL child stack would have died with SIGSEGV.
This change fixes the LTP clone04 testcase.
Change-Id: I663b34f34bc8dad2aa405c46e4eed4418cccca0d
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Elliott Hughes [Thu, 24 Mar 2016 03:28:30 +0000 (03:28 +0000)]
Merge "Remove the __USE_GNU guard from pthread_setname_np again."
Elliott Hughes [Thu, 24 Mar 2016 03:26:35 +0000 (20:26 -0700)]
Remove the __USE_GNU guard from pthread_setname_np again.
Caused build breakage, but not spotted by TreeHugger:
external/libnfc-nxp/Linux_x86/phDal4Nfc.c:737:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
pthread_setname_np(pthread_self(), "reader");
^
Nice file name.
Change-Id: I102e55718babf4e4f2f2c64066c6a83ed3ac86d3
Elliott Hughes [Thu, 24 Mar 2016 02:47:10 +0000 (02:47 +0000)]
Merge "Add pthread_getname_np."
Elliott Hughes [Wed, 23 Mar 2016 18:20:47 +0000 (11:20 -0700)]
Add pthread_getname_np.
Also guard both these GNU extensions with _GNU_SOURCE.
Also improve the tests to test each case on both the current thread and
another thread, since the code paths are totally different.
Bug: http://b/
27810459
Change-Id: I72b05bca5c5b6ca8ba4585b8edfb716a1c252f92
Greg Hackmann [Thu, 24 Mar 2016 00:32:35 +0000 (00:32 +0000)]
Merge "genversion-scripts: fix script name in autogenerated comment"
Greg Hackmann [Thu, 3 Mar 2016 21:10:23 +0000 (13:10 -0800)]
genversion-scripts: fix script name in autogenerated comment
Change-Id: I2a304818cfc54d08a08d2e621e4cf74e7ce465dd
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Elliott Hughes [Wed, 23 Mar 2016 18:22:16 +0000 (18:22 +0000)]
Merge "Move relocation_packer off libnativehelper."
Elliott Hughes [Wed, 23 Mar 2016 03:27:39 +0000 (20:27 -0700)]
Move relocation_packer off libnativehelper.
Also remove other bits of makefile cruft.
Change-Id: I8b69822200959368003a8af9d1595bea9182d6d8
Yabin Cui [Wed, 23 Mar 2016 02:32:41 +0000 (02:32 +0000)]
Merge "Fix pthread.pthread_barrier_smoke test."
Yabin Cui [Wed, 23 Mar 2016 02:32:30 +0000 (02:32 +0000)]
Merge "CloseArchive() to free memory when OpenArchive fails."
Yabin Cui [Tue, 22 Mar 2016 00:10:12 +0000 (17:10 -0700)]
CloseArchive() to free memory when OpenArchive fails.
Bug:
26962895
Change-Id: I42418eee320ddae857b42572690316c53f638e85