Commit graph

27325 commits

Author SHA1 Message Date
Josh Gao
0bd2520fff Merge "Block TIMER_SIGNAL in sigprocmask(SIG_SETMASK, ...)."
am: 069d5aef90

Change-Id: I2da0d2b41f97a443798e6a4466d4226a740ec48e
2018-10-10 13:51:03 -07:00
Josh Gao
069d5aef90 Merge "Block TIMER_SIGNAL in sigprocmask(SIG_SETMASK, ...)." 2018-10-10 20:38:46 +00:00
Elliott Hughes
af32e53777 Merge "Add _SC_UIO_MAXIOV as a synonym for _SC_IOV_MAX."
am: d3aa44f7e9

Change-Id: Iefc3d62d42f838a7cdb37edf258b78e7b8b2d05e
2018-10-10 10:01:12 -07:00
Elliott Hughes
d3aa44f7e9 Merge "Add _SC_UIO_MAXIOV as a synonym for _SC_IOV_MAX." 2018-10-10 16:40:46 +00:00
Josh Gao
baf20fc912 Block TIMER_SIGNAL in sigprocmask(SIG_SETMASK, ...).
Previously, we were zeroing out the reserved signals, when we actually
wanted to have TIMER_SIGNAL always be blocked, and the other signals
always be unblocked. This resulted in process termination when a
SIGEV_THREAD timer callback calls sigprocmask(SIG_SETMASK, ...) with
any signal mask value, and then subsequently fails to complete its
callback and reach the sigtimedwait in bionic before the next timer
iteration triggers.

Add a how argument to filter_reserved_signals to appropriately
block/unblock our reserved signals.

Bug: http://b/116783733
Test: bionic-unit-tests32/64
Change-Id: Ie5339682cdeb914711cd4089cd26ee395704d0df
2018-10-09 16:27:22 -07:00
Elliott Hughes
82ab481123 Add _SC_UIO_MAXIOV as a synonym for _SC_IOV_MAX.
glibc and musl both have these as synonyms for one another, so we may
as well do the same and get backwards compatibility on old OS releases.

Bug: N/A
Test: ran tests
Change-Id: I6bf38ea446560e1b11022ff539f07eb67c157049
2018-10-09 13:56:06 -07:00
Ryan Prichard
06ec50f087 Merge changes I8c6b2d1d,I06e0f759,I95d79809
am: cb8ed207d2

Change-Id: I0b0a272d704788d3f21a0365e34f6b09a792529b
2018-10-08 13:45:49 -07:00
Ryan Prichard
cb8ed207d2 Merge changes I8c6b2d1d,I06e0f759,I95d79809
* changes:
  Add async_safe_format_fd_va_list
  Fix normalize_path's handling of "/.."
  linker: fix invalid zip file handling
2018-10-08 20:29:00 +00:00
Ryan Prichard
5de9a31c05 Add async_safe_format_fd_va_list
Bug: none
Test: bionic unit tests
Change-Id: I8c6b2d1d118f4182dd7bf1cbfba78f20b3cefc79
2018-10-08 13:27:16 -07:00
Ryan Prichard
269bb496c5 Fix normalize_path's handling of "/.."
Currently it normalizes the path to a string with a single uninitialized
byte. It should instead normalize it to "/".

Bug: none
Test: /data/nativetest/linker-unit-tests/linker-unit-tests32
Test: /data/nativetest64/linker-unit-tests/linker-unit-tests64
Change-Id: I06e0f7598d16acfa21875dad53efbc293cfeb44d
2018-10-08 13:27:16 -07:00
Ryan Prichard
0adf09b370 linker: fix invalid zip file handling
The argument to CloseArchive has type ZipArchiveHandle, but we're
passing it a ZipArchiveHandle*. The compiler doesn't detect the type
mismatch because ZipArchiveHandle is a typedef for void*.

Remove a duplicate close() call:

The fourth argument to OpenArchiveFd is "bool assume_ownership = true".
Even if the function fails, ownership of the fd is still transferred to
a ZipArchive object that's deleted when this code calls CloseArchive.

AFAIK, this code path is rarely or never hit.

Bug: none
Test: manual (eventually, 'linker64 /system!/foo')
Change-Id: I95d79809b6e118fb3c39c7b98b8055c8e324db1a
2018-10-08 13:27:16 -07:00
Elliott Hughes
adf9339e1a Merge "<sys/param.h>: pollute the namespace with <endian.h>."
am: 773c697f81

Change-Id: Ia39030966521ed2f9b90fda2417c1ba345f96cb7
2018-10-05 17:31:52 -07:00
Treehugger Robot
773c697f81 Merge "<sys/param.h>: pollute the namespace with <endian.h>." 2018-10-06 00:17:35 +00:00
Elliott Hughes
00dda09c08 <sys/param.h>: pollute the namespace with <endian.h>.
glibc does, and autoconf relies on that for its AC_C_BIGENDIAN test.

Bug: N/A
Test: N/A
Change-Id: I3acaaf0d7a69e8ed4e64239e4fe7f21c7001e717
2018-10-05 14:54:48 -07:00
Elliott Hughes
ac59303f5e Merge "Another round of documentation."
am: 9ebcb013b1

Change-Id: I3b924ada853a96c6747b619087694bb81e63abaa
2018-10-05 14:17:13 -07:00
Elliott Hughes
9ebcb013b1 Merge "Another round of documentation." 2018-10-05 21:04:15 +00:00
Elliott Hughes
dd6763a6c6 Another round of documentation.
Bug: N/A
Test: N/A
Change-Id: I1b818fbb36ddd6d084dee56828290c2717a0c9b0
2018-10-04 16:35:13 -07:00
Christopher Ferris
0143ea885a Merge "Add new parameter for creation of MapInfo object."
am: 4b7c5cca7f

Change-Id: I57bef03ec0ed044cce23a70bcd18a95bc20bbca9
2018-10-04 15:48:27 -07:00
Christopher Ferris
4b7c5cca7f Merge "Add new parameter for creation of MapInfo object." 2018-10-04 22:38:26 +00:00
Yi Kong
9617cdbbd8 Merge "Exclude libclang_rt.builtins symbols"
am: c15baefc0a

Change-Id: Iae6bce757afef1b7fe0f564d1d9b3ae1fef05d20
2018-10-04 15:24:55 -07:00
Yi Kong
c15baefc0a Merge "Exclude libclang_rt.builtins symbols" 2018-10-04 22:09:55 +00:00
Christopher Ferris
6774cc5b99 Add new parameter for creation of MapInfo object.
Bug: 109657296

Test: Unit tests pass.
Change-Id: Ie33b50234fa9ba2c5107c3eb0da36a466bba1589
2018-10-04 08:41:10 -07:00
Yi Kong
7786a344ce Exclude libclang_rt.builtins symbols
Similar to libgcc, libclang_rt.builtins symbols need to be excluded.

Bug: 29275768
Change-Id: Iaf7381de3b4dbd92997abd03667dea0baaab98e1
2018-10-03 10:07:13 +00:00
Chih-hung Hsieh
3be32dd4d8 Merge "Work around bugprone-exception-escape bug."
am: 9df26193c8

Change-Id: I7543b92207d3733b902c371d155c2e245098fc12
2018-10-02 12:35:07 -07:00
Chih-hung Hsieh
9df26193c8 Merge "Work around bugprone-exception-escape bug." 2018-10-02 18:30:31 +00:00
Elliott Hughes
f9740e3a02 Merge "Make fclose/pclose distinct."
am: 8d63ae128f

Change-Id: I7842485e03f0867544b494602a0f5a276d06135b
2018-10-02 10:12:04 -07:00
Elliott Hughes
8d63ae128f Merge "Make fclose/pclose distinct." 2018-10-02 16:57:11 +00:00
Christopher Ferris
6cbef9fb51 Merge "Move isolated test runner out of bionic."
am: 928ce8eb64

Change-Id: I40e3c12ead2690eb2b4a690e3e4fff423b522815
2018-10-01 16:36:39 -07:00
Chih-Hung Hsieh
153b71c407 Work around bugprone-exception-escape bug.
Bug: 117120485
Test: build with WITH_TIDY=1 and global bugprone-* checks.
Change-Id: I28aa2a176bd7d2ae4961877a8122a09666d85237
2018-10-01 16:17:44 -07:00
Elliott Hughes
22917f63ee Make fclose/pclose distinct.
I failed to convince the compiler/linker to just refrain (via factoring out,
attribute `noinline`, or meddling with `--icf=none`), but luckily I noticed
that we should have CHECK_FP in each function for a better error message,
and the distinct error messages keep the two functions apart.

(Also add a missing CHECK_FP to `clearerr_unlocked`.)

Bug: http://b/116969207
Test: manual with a modified `crasher`
Change-Id: Ic122e90e94f7e22f486be57d3dac7137a225d682
2018-10-01 16:17:37 -07:00
Christopher Ferris
928ce8eb64 Merge "Move isolated test runner out of bionic." 2018-10-01 23:07:31 +00:00
Stephen Hines
9821053962 Merge "Fix up a few bionic tests for the clang-r339409 update."
am: 05ba56d6c0

Change-Id: Ief43b16f1d2ca36558b14a30d0fe3191dc8a137b
2018-10-01 09:20:29 -07:00
Stephen Hines
05ba56d6c0 Merge "Fix up a few bionic tests for the clang-r339409 update." 2018-10-01 15:57:35 +00:00
Christopher Ferris
6d2c0bdf6e Move isolated test runner out of bionic.
Use a global gtest isolation runner rather than the custom one in
bionic.

Test: Ran all unit tests and verified same behavior before and after.

Change-Id: I24a7cf17cf8e018d0f51969c64b53ce9059cc779
2018-09-27 22:22:17 -07:00
Christopher Ferris
dec01ca274 Merge "Ignore output to stderr while enumerating tests"
am: f3ff8dc6f4

Change-Id: I020220e403a9d06277d3981c74d624317af864a0
2018-09-27 16:34:25 -07:00
Tom Cherry
ece678783d Merge "Always return /vendor/bin/sh as shell for OEM ids in getpwnam() etc."
am: ddf92a1ba5

Change-Id: Ie61454198518166534506c3dd2a5b1708375bb07
2018-09-27 16:33:54 -07:00
Colin Cross
b07e2dd91f Merge "Disable STL for crt objects"
am: 6b755755bc

Change-Id: I96798ccc99df8d58ca428503b07e994204245571
2018-09-27 16:25:55 -07:00
Christopher Ferris
f3ff8dc6f4 Merge "Ignore output to stderr while enumerating tests" 2018-09-27 23:23:36 +00:00
Treehugger Robot
ddf92a1ba5 Merge "Always return /vendor/bin/sh as shell for OEM ids in getpwnam() etc." 2018-09-27 23:23:34 +00:00
Colin Cross
6b755755bc Merge "Disable STL for crt objects" 2018-09-27 23:23:19 +00:00
Elliott Hughes
d7ab721ec0 Merge "Use builtins for ceil/floor/rint/trunc on arm64"
am: 7208139406

Change-Id: I6559c8d36e08b281603852d7a6e4b6173a7cc4ce
2018-09-27 13:46:16 -07:00
Tom Cherry
fa5f61c8d9 Always return /vendor/bin/sh as shell for OEM ids in getpwnam() etc.
During the review of the script that generates /vendor/etc/passwd, it
was suggested that the shell be /vendor/bin/sh instead of the typical
/system/bin/sh.  This has subsequently caused bionic unit tests to
fail, since they always check that the shell is set to /system/bin/sh.

In the spirit of that review, libc is modified to return
/vendor/bin/sh for the OEM AID ranges and the test is updated to
expect this.

Test: bionic unit tests
Change-Id: Ie7c1c48fde8a71b3df1aa0ef112d42ab7bd3baec
2018-09-27 20:29:49 +00:00
Elliott Hughes
7208139406 Merge "Use builtins for ceil/floor/rint/trunc on arm64" 2018-09-27 20:24:28 +00:00
Colin Cross
ab17944178 Disable STL for crt objects
cc_objects are getting support for STL headers, disable them for
crt objects to avoid a circular dependency through libc++.

Test: m checkbuild
Change-Id: I4e0f4a2193ce98ec4b8802492add9014ec0dba98
2018-09-27 11:03:22 -07:00
Elliott Hughes
a7ec71a93f Merge "Add reallocarray(3)."
am: e27886eaea

Change-Id: I03982fe8ad87a4938c3079a4db7454116fa8ab1c
2018-09-26 16:16:10 -07:00
Elliott Hughes
e27886eaea Merge "Add reallocarray(3)." 2018-09-26 22:54:54 +00:00
Elliott Hughes
b177085ce7 Add reallocarray(3).
Originally a BSD extension, now in glibc too. We've used it internally
for a while.

(cherry-pick of e4b13f7e3ca68edfcc5faedc5e7d4e13c4e8edb9.)

Bug: http://b/112163459
Test: ran tests
Change-Id: I813c3a62b13ddb91ba41e32a5a853d09207ea6bc
Merged-In: I813c3a62b13ddb91ba41e32a5a853d09207ea6bc
2018-09-26 14:24:18 -07:00
Dimitry Ivanov
db938a8138 Merge "linker: extract defaults and source files"
am: e4e3de819d

Change-Id: I7da222d54c9ecca34e870199b2e165fd5c84b66d
2018-09-26 02:20:59 -07:00
Dimitry Ivanov
e4e3de819d Merge "linker: extract defaults and source files" 2018-09-26 09:03:45 +00:00
Chih-hung Hsieh
eca0afd80b Merge "Add noexcept to move constructors and assignment operators."
am: fe108db540

Change-Id: Ib70e6dec446c7fe886b1dee2980fc14108b35ccf
2018-09-25 16:43:12 -07:00