Commit graph

24261 commits

Author SHA1 Message Date
Elliott Hughes
95bf414d1b Merge "Add POSIX fexecve."
am: a1c30b98e9

Change-Id: Ia8ffffe3b263a7b8166dd1b34877860f6ba93152
2017-10-19 15:49:18 +00:00
Elliott Hughes
01a57d1eb6 Call fmtmsg/getdate/getdate_err useless.
They're POSIX, and they're implemented in iOS and glibc, but they're
not actually used in any codebase I have access to. They're *defined*
in several places, and some of those places have a handful of tests,
but I couldn't find a single genuine caller.

Bug: N/A
Test: N/A
Change-Id: Id3e2c36183fcff323aa5a2e3a3dabaa8378fae56
2017-10-19 15:45:04 +00:00
Elliott Hughes
a1c30b98e9 Merge "Add POSIX fexecve." 2017-10-19 15:42:56 +00:00
Dimitry Ivanov
fd38bdf0db Merge "Use ro.debuggable property instead of checking build type"
am: d6084a764e

Change-Id: I4ec3bdc04c3ed98a53427144129e19f54e152ff5
2017-10-19 06:54:19 +00:00
Dimitry Ivanov
d6084a764e Merge "Use ro.debuggable property instead of checking build type" 2017-10-19 06:51:21 +00:00
Jiyong Park
01162f2469 Fix: linker segfault on dlopen of a DF_1_GLOBAL so
Added the missing null check routine.

Bug: 67755729
Test: dlfcn.dlopen_df_1_global added and it passes
Change-Id: Ibe8db18b0b5a481e2e9937041abef6d6b179dd87
2017-10-19 15:13:54 +09:00
Josh Gao
44f6e189d9 Correctly call vector::erase after std::remove_if.
std::remove_if moves removed elements to the end, without actually
resizing the collection. To do so, you have to call erase on its
returned iterator.

Test: mma
Change-Id: Iae7f2f194166408f2b101d0c1cfc95202d8bbe63
2017-10-18 17:29:39 -07:00
Elliott Hughes
4d215aad85 Add POSIX fexecve.
I'm skeptical about the usefulness of this, but it's in POSIX, it's
in glibc (but not iOS), and it is used in some internal source (test
runners and container code).

Bug: N/A
Test: ran tests
Change-Id: I92c5398f2a679b21a33fba92bc8e67e3ae2eb76f
2017-10-18 16:26:17 -07:00
Elliott Hughes
4dd32e00f7 Merge "More <limits.h> fixes."
am: 8f57fd4179

Change-Id: I5d917d4b142fa6a04b13c019c00fa3690771065e
2017-10-18 23:26:14 +00:00
Elliott Hughes
8f57fd4179 Merge "More <limits.h> fixes." 2017-10-18 23:21:49 +00:00
Tom Cherry
7777053f2c Merge "Update CachedProperty to support long ro. properties"
am: 701981a895

Change-Id: I5a0afa7fd058be54c2efcb430d690cbccb8d1989
2017-10-18 21:50:10 +00:00
Tom Cherry
701981a895 Merge "Update CachedProperty to support long ro. properties" 2017-10-18 21:03:42 +00:00
Elliott Hughes
fa386e0d1e Add POSIX swab.
Surprisingly to me, there are actual uses of `swab` in the codebases
I have available to search, including one with a #ifndef __ANDROID__
around it.

Bug: N/A
Test: ran tests
Change-Id: Ic91b78ae22bb65c346cb46dd38916f48d979abe0
2017-10-18 13:34:32 -07:00
Elliott Hughes
19d7685982 More <limits.h> fixes.
Went through the POSIX spec for the _POSIX* and _XOPEN* constants.

Bug: http://b/32776472
Test: ran tests
Change-Id: I389100dbc7de354eae9056e44b0a7fa8c37374e3
2017-10-18 13:27:01 -07:00
Tom Cherry
24a95d27c7 Update CachedProperty to support long ro. properties
We store a pointer to the long ro. property within the shared property
area, as we know that this pointer will never change locations or be
invalidated and it saves us from needing to allocate arbitrarily sized
storage for the property.

Bug: 23102347
Bug: 34954705
Test: bionic-unit-tests
Change-Id: I9f9147a2f951f20f51e4664c6faf9ff7f6a9502a
2017-10-18 10:25:39 -07:00
dimitry
59d3062f51 Use ro.debuggable property instead of checking build type
Test: make
Change-Id: I094663c20721f345cd6684e06fcef38f300790be
2017-10-18 13:23:08 +02:00
Josh Gao
609124f0fc Merge "Rename libdl.c to libdl.cpp."
am: ab9dc08bdd

Change-Id: Ie353e9e759ff5e2b4b5b873d36b7b309f21d6766
2017-10-17 22:52:20 +00:00
Treehugger Robot
ab9dc08bdd Merge "Rename libdl.c to libdl.cpp." 2017-10-17 22:46:00 +00:00
Dan Albert
f945fb6b8a Revert "Revert "Cleanup transitive includes in the legacy inlines.""
This reverts commit 9cb8639b18.

Fixed all the broken builds that were reported to me before this was
reverted.

Test: make checkbuild  # kikey960, marlin, aosp_arm64; master and aosp
2017-10-17 11:07:26 -07:00
Elliott Hughes
0cf1a3699b Merge "Add pthread_setschedprio."
am: 435e6384de

Change-Id: I8bb380bef9132c7ca269edf45a75899f058a2ace
2017-10-17 18:04:53 +00:00
Christopher Ferris
30ed16f7c7 Merge "Force _start to be the top frame for the linker."
am: 5f1a8440ad

Change-Id: If43693422ab2d09e8309d6be3033e54e9a5c340f
2017-10-17 18:02:21 +00:00
Treehugger Robot
435e6384de Merge "Add pthread_setschedprio." 2017-10-17 17:58:19 +00:00
Christopher Ferris
5f1a8440ad Merge "Force _start to be the top frame for the linker." 2017-10-17 17:55:26 +00:00
Elliott Hughes
dff08ced56 Add pthread_setschedprio.
Bug: http://b/26204555
Test: ran tests
Change-Id: Ic34062b9b6036a1ce2642a069514bab48a893338
2017-10-17 09:14:05 -07:00
Elliott Hughes
8b9405e779 Merge "Complete <netdb.h>."
am: bf886f621b

Change-Id: Iec21626a379ef75d1dc2c3979da4a3a3bcbb225a
2017-10-17 16:07:16 +00:00
Elliott Hughes
bf886f621b Merge "Complete <netdb.h>." 2017-10-17 16:03:54 +00:00
Orion Hodson
e7b0fe7996 Merge "Revert "Cleanup transitive includes in the legacy inlines.""
am: 1ef6a6ad1a

Change-Id: I0315635bb56d3948c156984f7d21d8fb5cdee0a1
2017-10-17 08:57:49 +00:00
Orion Hodson
1ef6a6ad1a Merge "Revert "Cleanup transitive includes in the legacy inlines."" 2017-10-17 08:50:07 +00:00
Orion Hodson
9cb8639b18 Revert "Cleanup transitive includes in the legacy inlines."
This reverts commit 43df953502.

Reason for revert: Breaks most AOSP builds.
https://android-build.googleplex.com/builds/branch-dashboard/aosp-master?build_id=4399910

Change-Id: I53459f97b7dffb1f7f602db03893564dd3cfe6bf
2017-10-17 08:41:23 +00:00
Dan Albert
e034635a6f Merge "Cleanup transitive includes in the legacy inlines."
am: 9deef03c16

Change-Id: Ifece0b79fafb329bca8fd4799edcd72b5fbfd5df
2017-10-17 07:23:20 +00:00
Treehugger Robot
9deef03c16 Merge "Cleanup transitive includes in the legacy inlines." 2017-10-17 07:17:23 +00:00
Josh Gao
9a0a7b3f5c Merge changes I93dc3811,I710d2929,I6ae029ed
am: d4b4f06cad

Change-Id: Ie8d3b78f8195668d0a1cdd3ba80a44c480251e5d
2017-10-17 06:33:47 +00:00
Treehugger Robot
d4b4f06cad Merge changes I93dc3811,I710d2929,I6ae029ed
* changes:
  Add libc_nopthread.
  Trivial style fix.
  Don't use PR_SET_DUMPABLE to prevent crash dumping in death tests.
2017-10-17 06:29:27 +00:00
Josh Gao
dfcc6e4f8a Rename libdl.c to libdl.cpp.
The no-arg function definitions in libdl.c weren't strictly correct,
because they should have taken void. Rename .c to .cpp instead of
fixing them.

Test: mma
Change-Id: I9e3528c836ffc8625a6a4d529034263b19b9fb3a
2017-10-16 21:31:37 -07:00
Josh Gao
0e0e370154 Add libc_nopthread.
Add a static library containing the non-pthread dependent parts of
libc.

Bug: http://b/64400027
Test: sailfish boots
Test: bionic-unit-tests32/64, no new failures
Test: bionic-unit-tests-static32/64, no new failures
Change-Id: I93dc3811acddad7936d11b369b98cefd945ee2d5
2017-10-16 21:31:37 -07:00
Josh Gao
a0f6dc577e Trivial style fix.
Test: none
Change-Id: I710d29293171c6160558dab66c515eae16b92923
2017-10-16 21:31:37 -07:00
Josh Gao
084f6ec9af Don't use PR_SET_DUMPABLE to prevent crash dumping in death tests.
Bug: http://b/27833000
Test: bionic-unit-tests are way faster
Change-Id: I6ae029edcd4c4b4b0dfaf613fc17c208d3cb24d1
2017-10-16 21:31:37 -07:00
Elliott Hughes
423f23230a Merge "Remove dangling symlink."
am: 03507a1d29

Change-Id: I96a63a2d3d6c6c902fe2c789d262ce440dc74cdd
2017-10-17 01:56:23 +00:00
Treehugger Robot
03507a1d29 Merge "Remove dangling symlink." 2017-10-17 01:37:27 +00:00
Elliott Hughes
5fd11666df Remove dangling symlink.
Bug: N/A
Test: N/A
Change-Id: I6af95827b28f47aa0cd5f1abb5dded15253f7686
2017-10-16 15:10:00 -07:00
Christopher Ferris
aa81761c5e Force _start to be the top frame for the linker.
I noticed that sometimes the old unwinder will add an extra PC 0 frame
after this change, but the new unwinder works in all cases. I'm not going
to fix the old unwinder since I plan to remove it very soon.

Bug: 67784501

Test: Forced a crash in the linker and verified that the unwind
Test: stops in __dl_start. Tested on arm/aarch64/x86/x86_64.

Change-Id: Id6585768023256be5c1d341df7b06b786a220b40
2017-10-16 14:43:34 -07:00
Elliott Hughes
5033918092 Complete <netdb.h>.
Add all the missing <netdb.h> functions.

Also fix getservbyport to handle a null protocol correctly.

Also fix getservbyname/getservbyport to not interfere with getservent.

Also fix endservent to reset getservent iteration.

Also reduce unnecessary differences from upstream NetBSD sethostent.c.

The servent implementation is still horrific, and we should
probably support protoent too so that debugging tools can use
getprotobyname/getprotobynumber.

Bug: N/A
Test: ran tests
Change-Id: I639108c46df0a768af297cf3bbce857cb1bef9d9
2017-10-15 10:37:51 -07:00
Dan Albert
42ed3bfc05 Merge "Fix missing includes, again."
am: a27bfd4131

Change-Id: I4c44c105270348cfc165995ee9acc84c82ce2400
2017-10-15 03:40:16 +00:00
Elliott Hughes
7d8623a4d6 Merge "Fix mip64 build."
am: 92b0f36acc

Change-Id: Id969e1d35aaff2054750e35647d0564631ef7c67
2017-10-15 03:39:55 +00:00
Elliott Hughes
ec00ab5acc Merge "Ignore pthread_getconcurrency/pthread_setconcurrency."
am: 9db0e013b1

Change-Id: I6ba0569decc4b24b865060b73225dd992f0f7780
2017-10-15 03:39:33 +00:00
Goran Ferenc
76c07c50af Merge "MIPS: Fix MIPS linker VDSO issues"
am: 73651cf23f

Change-Id: Icedefd654fb8ddcee92b8ee61548f155c0777386
2017-10-15 03:39:04 +00:00
Goran Jakovljevic
4471061ad5 Merge "Define BIONIC_STOP_UNWIND for mips"
am: 1a5a9b7bbc

Change-Id: Ia56d0056ec235781abff5427c62e4507765385c0
2017-10-15 01:49:29 +00:00
Elliott Hughes
c453951f50 Merge "Ignore endutxent."
am: f9433e6891

Change-Id: I92bb8c740e6aa8abaaa95d85501e93b632bdb8f3
2017-10-15 01:48:46 +00:00
Treehugger Robot
a27bfd4131 Merge "Fix missing includes, again." 2017-10-13 23:27:26 +00:00
Treehugger Robot
92b0f36acc Merge "Fix mip64 build." 2017-10-13 22:26:31 +00:00