Commit graph

26727 commits

Author SHA1 Message Date
Elliott Hughes
aa3ce57149 Merge "Update libc status documentation."
am: 4502c4060a

Change-Id: I4e2bfe7a1a1b105698d8d6891cdc8963c54e94c3
2018-07-18 17:52:46 -07:00
Treehugger Robot
ad596bf4fc Merge "setjmp is a macro." 2018-07-19 00:42:54 +00:00
Treehugger Robot
4502c4060a Merge "Update libc status documentation." 2018-07-19 00:42:47 +00:00
Elliott Hughes
6094704eb6 Merge "Add C11 timespec_get."
am: 76221401ed

Change-Id: I4d2691c302e8863b0d104a739d4a60fb350947d2
2018-07-18 16:28:02 -07:00
Treehugger Robot
76221401ed Merge "Add C11 timespec_get." 2018-07-18 23:16:24 +00:00
Elliott Hughes
30340d2ad0 Merge "Expose __res_randomid."
am: 99a8caf2b8

Change-Id: I4a3d7a723a67e0d02e524fd37988e4eddf22d42c
2018-07-18 10:15:57 -07:00
Treehugger Robot
99a8caf2b8 Merge "Expose __res_randomid." 2018-07-18 17:06:28 +00:00
Florian Mayer
2d6030b2f5 Fix malloc_hooks for hooks_write_malloc_leak_info.
Change-Id: I99f9ee0221bc7bbb5e7dd173ae5a6007f0fa871d
2018-07-18 15:25:45 +01:00
Tao Bao
1fba67ff11 Merge "The --gtest_color flag should take a priority."
am: 944fcb53c1

Change-Id: Ib6bd087be0bdef051f8ae77537235b2a226b6b44
2018-07-17 21:15:40 -07:00
Tao Bao
944fcb53c1 Merge "The --gtest_color flag should take a priority." 2018-07-18 04:08:46 +00:00
Tao Bao
afacaaba8c The --gtest_color flag should take a priority.
This along with commit c1ef5eb034 should
get back to the initial behavior prior to the change in commit
83b6379783.

Fixes: 111396376
Test: `adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_color=yes`
      shows colored output.
Test: `adb shell -t /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_color=no`
      doesn't add color escapes.
Change-Id: I88530e8b264cd0c259c16b09bdf867cdd2e88224
2018-07-17 19:08:13 -07:00
Elliott Hughes
bf74815b52 setjmp is a macro.
POSIX says it's unspecified whether setjmp is a macro or a function,
but C11 says it's a macro, and the C standard always wins.

Bug: https://github.com/android-ndk/ndk/issues/744
Test: ran tests
Change-Id: I4a1abc37724f8e9d9498f2093ef3c1f3b8253949
2018-07-17 13:55:36 -07:00
Elliott Hughes
a7119af33e Update libc status documentation.
Bug: N/A
Test: N/A
Change-Id: Ied9659f0388a4affa65f0948b3e4a58d0dca5605
2018-07-17 13:26:14 -07:00
Elliott Hughes
f98d87b831 Add C11 timespec_get.
Bug: https://github.com/android-ndk/ndk/issues/744
Test: ran tests
Change-Id: Iad9514946e06d55b6a3aa0f945d9a63bff900881
2018-07-17 13:21:05 -07:00
Elliott Hughes
3a5fd0014c Expose __res_randomid.
I don't think this will help the original submitter, because <resolv.h>
is mostly useless on Android. One day we might have a deprecation and
removal policy for the NDK, but until then we should probably maintain
this header.

Bug: https://github.com/android-ndk/ndk/issues/739
Test: ran tests
Change-Id: I2db859abfdebc3824c997462fa6133d5b355a8dd
2018-07-17 13:02:52 -07:00
Haibo Huang
eeb0210cf0 Merge "Only use color in supported terminal."
am: 9842db42e9

Change-Id: Id7970786ad9b17847cc8085bf44c25dc47f5178a
2018-07-16 17:43:03 -07:00
Treehugger Robot
9842db42e9 Merge "Only use color in supported terminal." 2018-07-17 00:34:34 +00:00
Haibo Huang
c1ef5eb034 Only use color in supported terminal.
Test: compile
Change-Id: Ibb962597e065ebb90a53dd8bc62c4b774a2e4f10
2018-07-16 22:53:49 +00:00
Christopher Ferris
29f80a8ed5 Merge "Disable malloc debug intercepts when exiting."
am: a9713035ba

Change-Id: If7ef67cf0d7864e91b107deb41b0761de2ddf538
2018-07-13 11:46:37 -07:00
Christopher Ferris
a9713035ba Merge "Disable malloc debug intercepts when exiting." 2018-07-13 18:15:59 +00:00
Ryan Prichard
1872c21ad5 Merge "Call __emutls_unregister_key on dlclose"
am: 2e457f5128

Change-Id: Ic4d5d66b811a518adff95c96ef05b1f6b9797136
2018-07-11 22:53:58 -07:00
Treehugger Robot
2e457f5128 Merge "Call __emutls_unregister_key on dlclose" 2018-07-12 04:33:19 +00:00
Christopher Ferris
97b4747102 Disable malloc debug intercepts when exiting.
There is a hang when enabling leak_track since the dumping of the
leak data can wind up doing an allocation.

Add new system unit test to make sure this doesn't happen again.

Bug: 111146059

Test: Test program that leaks does not hang forever.
Test: Unit tests pass.
Change-Id: Icf99be58ba5db98ee124a471b957a086045f5870
2018-07-11 15:23:00 -07:00
Elliott Hughes
2e321dcdbb Merge "Remove workarounds for old versions of clang and GCC."
am: 06f217d399

Change-Id: I9baa076259e4a146b7a7734a3ff3b7365cfd9f15
2018-07-11 15:19:36 -07:00
Elliott Hughes
38bedbbf48 Merge "Reimplement popen(3)/pclose(3)."
am: 67267589ba

Change-Id: Id8952b7b47847cd3a83e75317e0cd25434cb81e3
2018-07-11 15:17:42 -07:00
Treehugger Robot
06f217d399 Merge "Remove workarounds for old versions of clang and GCC." 2018-07-11 22:08:46 +00:00
Treehugger Robot
67267589ba Merge "Reimplement popen(3)/pclose(3)." 2018-07-11 22:02:13 +00:00
Elliott Hughes
3012b9636b Remove workarounds for old versions of clang and GCC.
Bug: N/A
Test: ran tests
Change-Id: I89d224c743f5113771de41c74161a7a5ccad05e4
2018-07-11 13:18:29 -07:00
Elliott Hughes
468efc80da Reimplement popen(3)/pclose(3).
pclose(3) is now an alias for fclose(3). We could add a FORTIFY check
that you use pclose(3) if and only if you used popen(3), but there seems
little value to that when we can just do the right thing.

This patch also adds the missing locking to _fwalk --- we need to lock
both the global list of FILE*s and also each FILE* we touch. POSIX says
that "The popen() function shall ensure that any streams from previous
popen() calls that remain open in the parent process are closed in the
new child process", which we implement via _fwalk(fclose) in the child,
but we might want to just make *all* popen(3) file descriptors O_CLOEXEC
in all cases.

Ignore fewer errors in popen(3) failure cases.

Improve popen(3) test coverage.

Bug: http://b/72470344
Test: ran tests
Change-Id: Ic937594bf28ec88b375f7e5825b9c05f500af438
2018-07-11 12:15:26 -07:00
Haibo Huang
caffd8c64b Merge "Remove bionic test's dependency on gtest internal."
am: 47c859c91b

Change-Id: I790efddab68ea9a1729daf6a7e73c99f2c5abef5
2018-07-10 18:40:24 -07:00
Treehugger Robot
47c859c91b Merge "Remove bionic test's dependency on gtest internal." 2018-07-11 00:38:27 +00:00
Haibo Huang
83b6379783 Remove bionic test's dependency on gtest internal.
It is wrong to depend on internal ABI. And in the new version, they
explicitly disabled that.
b3d9be5c1d

Test: run test
Change-Id: I194a1e9417df2c52872b6eca6b61fb392e07cd29
2018-07-10 15:45:31 -07:00
Pirama Arumuga Nainar
7f90b1a4da Merge "Include uchar.h only for bionic"
am: f0296f35f6

Change-Id: I7dc6095d044b944a8a6b6c20f676e27fa9ccdfba
2018-07-09 18:26:10 -07:00
Treehugger Robot
f0296f35f6 Merge "Include uchar.h only for bionic" 2018-07-10 00:42:25 +00:00
Haibo Huang
e703203794 Merge "Change args to int64_t"
am: e2228cb64a

Change-Id: Ibed057c4c36c012fe813160413263a5de451c84a
2018-07-09 14:37:16 -07:00
Haibo Huang
e2228cb64a Merge "Change args to int64_t" 2018-07-09 20:32:31 +00:00
Christopher Ferris
2af26b1d0e Merge "Update to v4.17.3 kernel headers."
am: bcff244134

Change-Id: I5a43e45a3763a22448d90267219db46d8d91df2c
2018-07-09 12:32:57 -07:00
Christopher Ferris
bcff244134 Merge "Update to v4.17.3 kernel headers." 2018-07-09 19:23:00 +00:00
Pirama Arumuga Nainar
6c0eab9c5b Include uchar.h only for bionic
Bug: http://b/111265772

uchar.h is not available in the glibc used for the host.  Since Bionic's
stdatomic.h is also used for the host (via a copy in prebuilts/clang)
guard the include with a check for __BIONIC__.

Also replace the check for C11 around definition of
atomic_char_{16,32}_t with a check for __BIONIC__.  While we're here,
check if __cplusplus is defined before checking its value.  This avoids
a potential -Wundef warning.

Test: Build
Change-Id: Icb62150d978703175b78d8ad12b42cf98b424b9a
2018-07-09 12:03:23 -07:00
Elliott Hughes
7becee4104 Merge "Fix some long-standing UTF-8 bugs."
am: 07a7c9b316

Change-Id: Ifab63267e5c82c3986b62bbf1ba308b85a8ca79d
2018-07-09 11:39:54 -07:00
Elliott Hughes
07a7c9b316 Merge "Fix some long-standing UTF-8 bugs." 2018-07-09 18:27:31 +00:00
Bernie Innocenti
46682c3c7b Merge "bionic: Convert res_send.c to poll()"
am: 57fe8130af

Change-Id: Ia76afb3d224ce8ff0fea1de97e3ef5ac47466a57
2018-07-08 19:51:12 -07:00
Bernie Innocenti
57fe8130af Merge "bionic: Convert res_send.c to poll()" 2018-07-09 02:46:44 +00:00
Haibo Huang
d5ee4c5fb7 Change args to int64_t
The new benchmark framework uses int64_t for args.

Related benchmark change:
9913418d32 (diff-b9f55422dc0bd52759c6aaa25c305bb0R757)

Upgrade benchmark framework:
https://android-review.googlesource.com/c/platform/external/google-benchmark/+/714118

Test: compile and run bionic benchmark
Change-Id: I1b81c853c28abbead1816bf0be7a20a35e036619
2018-07-07 04:14:22 +00:00
Elliott Hughes
402c762fc9 Fix some long-standing UTF-8 bugs.
We we incorrectly rejecting U+fffe and U+ffff, and incorrectly accepting
characters above U+10ffff (see https://tools.ietf.org/html/rfc3629
section 12 for that restriction).

Bug: http://lists.landley.net/pipermail/toybox-landley.net/2017-September/009146.html
Test: ran tests
Test: also ran the exhaustive test from that email thread
Change-Id: I8ae8e41cef01b02933bd4f653ee07791932b79a5
2018-07-06 17:18:05 -07:00
Elliott Hughes
8d851c9a3e Merge "pthread_barrier_init: add a test for the count == 0 EINVAL case."
am: 1d7c04c20a

Change-Id: Ic1e0e233629e29447b565fdbe211c45550d5c40c
2018-07-06 16:30:24 -07:00
Treehugger Robot
1d7c04c20a Merge "pthread_barrier_init: add a test for the count == 0 EINVAL case." 2018-07-06 23:21:24 +00:00
Elliott Hughes
463faada00 pthread_barrier_init: add a test for the count == 0 EINVAL case.
The code was already correct, but we didn't have a test.

Bug: N/A
Test: ran tests
Change-Id: Ie63cbcfbfc2f2df6270aae98f0f4add484d210bc
2018-07-06 14:34:49 -07:00
Bernie Innocenti
b664724525 bionic: Convert res_send.c to poll()
Bug: 5854418
Test: adb shell /data/nativetest64/bionic-unit-tests-static/bionic-unit-tests-static
Test: manually:
    - flash and boot device
    - connect to wifi
    - launch WebView and resolv a few domains
Change-Id: I7b488e6d061d99a8a3c4bba69c2ac8609257eb6a
2018-07-05 11:39:09 +09:00
Tom Cherry
14d7e534eb Merge "Reland "Remove a check for AIDs in the OEM range.""
am: 50acae8f2a

Change-Id: If3ee425be7331b77d1adf2c39a7f6d409c22cbb3
2018-06-29 16:19:30 -07:00