Commit graph

35679 commits

Author SHA1 Message Date
Zijun Zhao
02ed7ea425 Merge "Fix incorrect API level for wcstombs and mbstowcs." 2021-11-12 01:32:47 +00:00
Treehugger Robot
2ee9abe69f Merge "Remove outdated ld.bfd usage." am: fe254da88f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1888176

Change-Id: Iddc2492a46a335412098102d96ba99f5caa3fc5d
2021-11-11 17:24:18 +00:00
Treehugger Robot
fe254da88f Merge "Remove outdated ld.bfd usage." 2021-11-11 17:12:48 +00:00
Stephen Hines
30cd30f644 Remove outdated ld.bfd usage.
LLD supports `-z global`, unlike ld.gold, which this was previously a
workaround for.

Test: mm in test dir
Change-Id: I1f621c329accfb31912a19544e34447aff0dfa28
2021-11-10 18:09:49 -08:00
Xin Li
e6b2f0fc4e Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I3908b0b506b7062e644da8b1dbb12e5e39eedafc
Change-Id: Icc732497519ce78dda180abb30194b73941ec896
2021-11-10 08:05:26 +00:00
ZijunZhao
57474c89fe Fix incorrect API level for wcstombs and mbstowcs.
Mbstowcs and wcstombs cannot get correct return value when called in the environment below api 21, and need to raise the API level to solve the problem.

Test: None
fix bug 1108 https://github.com/android/ndk/issues/1108

Change-Id: Iabcf1bff0be087288646687732ef68870630b48a
2021-11-09 23:29:33 +00:00
Treehugger Robot
157d55fb5a Merge "uchar.h tests: small improvements." am: 4b6ae54acf
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1883331

Change-Id: I1df98a5052654fc7a9cc133cf0820ac28d9eefb0
2021-11-09 19:11:46 +00:00
Treehugger Robot
4b6ae54acf Merge "uchar.h tests: small improvements." 2021-11-09 18:48:20 +00:00
Elliott Hughes
3d8156d3ec uchar.h tests: small improvements.
Explicitly test an invalid 5-byte UTF-8 sequence with mbrtoc16(3); the
fact that we weren't testing this was shown by coverage data.

Merge the surrogate pair tests in with their fewer-byte siblings to make
it clearer to a human reader that we've covered both cases.

Clear errno to make assertions about errno more convincing.

Test: treehugger
Change-Id: I485a48cc141f3e52058e2138326f3134d41b2243
2021-11-05 17:49:36 -07:00
Elliott Hughes
4b2ae78043 Merge "Add the missing '--' to shell invocations." am: 5205e8ac5e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1881791

Change-Id: Ie6dc2cb49f7ae38a90d8ee923fda494b486ed914
2021-11-05 21:35:17 +00:00
Elliott Hughes
5205e8ac5e Merge "Add the missing '--' to shell invocations." 2021-11-05 21:16:12 +00:00
Treehugger Robot
2de1071db7 Merge "Remove references to nonplat sepolicy" am: f1c36760be
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1882069

Change-Id: I06a7bd921d11d7ae007bfe53760105100d56810c
2021-11-05 15:54:03 +00:00
Treehugger Robot
f1c36760be Merge "Remove references to nonplat sepolicy" 2021-11-05 15:40:25 +00:00
Jeff Vander Stoep
70aa88c66c Remove references to nonplat sepolicy
"nonplat" was renamed to "vendor" in Android Pie, but was retained
here for Treble compatibility.

We're now outside of the compatbility window for these devices so
it can safely be removed.

Test: build boot cuttlefish device. adb remount, modify
/system/etc/selinux/plat_sepolicy_and_mapping.sha256 to force
on-device policy compilation. reboot. Verify that device boots
without new selinux denials.

Change-Id: I663a524670120ee19dfe785aa5f89b3981bdd378
2021-11-05 09:30:25 +01:00
Elliott Hughes
b6b7e2ee2e Add the missing '--' to shell invocations.
This came up with POSIX recently. Doesn't seem like it matters since
everyone's had this wrong for 40 years, but "meh" --- it's a trivial
fix, and it's strictly correct even if nobody needs this, so let's just
do it...

(Geoff Clare pointed out that my app compat concern "what if someone's
relying on this bug to pass flags to the shell?" isn't relevant because
while you can indeed do that, you then can't pass a command!)

Bug: https://austingroupbugs.net/view.php?id=1440
Test: treehugger
Change-Id: I64f6440da55e2dc29d0136ee62007197d2f00d46
2021-11-04 17:29:35 -07:00
Yi Kong
c7b2bd6f1d Merge "Re-enable LTO for linker" am: 7d3f322e64
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1873884

Change-Id: Ia6a2157d9392f20590febaa883d587818a4a4107
2021-11-04 10:50:28 +00:00
Yi Kong
7d3f322e64 Merge "Re-enable LTO for linker" 2021-11-04 10:34:31 +00:00
Yi Kong
9e33b76c67 Re-enable LTO for linker
Clang cannot build ifunc with LTO. This is a KI: https://bugs.llvm.org/show_bug.cgi?id=46488

Move the LTO: never down to libc itself, so that we can have LTO for the
rest of linker.

Test: m GLOBAL_THINLTO=true linker
Change-Id: I483fc3944e340638a664fb390279e211c2ae224b
2021-11-04 01:03:11 +08:00
Christopher Ferris
f4189ec764 Merge "Update to v5.15 kernel headers." am: fe95fe354f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1879068

Change-Id: I8e18bae287a23ffd38ca7949194b4fff5c4a4412
2021-11-03 02:18:55 +00:00
Christopher Ferris
fe95fe354f Merge "Update to v5.15 kernel headers." 2021-11-03 02:04:18 +00:00
Christopher Ferris
2abfa9e4f8 Update to v5.15 kernel headers.
Kernel headers coming from:

Git: https://android.googlesource.com/kernel/common/
Branch: android-mainline
Tag: android-mainline-5.15

Test: Builds, and ran bionic unit tests on flame.
Change-Id: I86901ea6d89fb0f7384b90a47bef35d194083c24
2021-11-02 15:53:58 -07:00
Colin Cross
bf49febd8f Merge "Reland: "Make native bridge libc uninstallable"" am: d7b0bde05f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1875494

Change-Id: I69051f4db7ca3ec9b923371f6642edaeb719747d
2021-10-30 05:13:17 +00:00
Colin Cross
d7b0bde05f Merge "Reland: "Make native bridge libc uninstallable"" 2021-10-30 04:56:21 +00:00
Christopher Ferris
098de1f324 Merge "Update for libunwindstack shared_ptr MapInfos." am: 5e30e44026
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1824364

Change-Id: I4f8397ddbb92604334a3b0fd4b9756664eab1da7
2021-10-30 01:33:06 +00:00
Christopher Ferris
5e30e44026 Merge "Update for libunwindstack shared_ptr MapInfos." 2021-10-30 01:13:53 +00:00
Colin Cross
7edd008d6d Reland: "Make native bridge libc uninstallable"
The native bridge libc.so is overridden by
//frameworks/libs/native_bridge_support/libc:libc, mark it
installable: false to avoid a collision in the install rules.
Allows removing BUILD_BROKEN_DUP_RULES from cuttlefish builds.

Relands I5379aa9595a714efdbe1ddc1ff4f65bb45fc67e8 with a fix to
only apply to the shared variant.

Bug: 204136549
Test: m checkbuild
Change-Id: I84abb577e3bb924d39a369670d0b2dbfac45bbc4
2021-10-29 14:25:57 -07:00
Christopher Ferris
d3f05492df Update for libunwindstack shared_ptr MapInfos.
Bug: 120606663

Test: Malloc debug unit tests pass.
Change-Id: Ic8fa25c770953ebc0a78d67e54bc0d7b8e0abd87
Merged-In: Ic8fa25c770953ebc0a78d67e54bc0d7b8e0abd87
(cherry picked from commit 04233539b4)
2021-10-29 13:03:05 -07:00
Colin Cross
4c7afdfdd0 Merge "Revert "Make native bridge libc uninstallable"" am: 3b868a87de
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1875094

Change-Id: I9a674e178c4bf5585cce2e3724235968bc09506d
2021-10-29 18:18:42 +00:00
Colin Cross
3b868a87de Merge "Revert "Make native bridge libc uninstallable"" 2021-10-29 18:10:59 +00:00
LaMont Jones
035702e36b Revert "Make native bridge libc uninstallable"
Revert submission 1874144-native_bridge_libc_dup_rules

Reason for revert: breaks ndk_translation_all build
Reverted Changes:
I5379aa959:Make native bridge libc uninstallable
I2220d6b48:Remove BUILD_BROKEN_DUP_RULES from cuttlefish buil...
I8e0eaed21:Make installable arch-variant for cc modules

Bug: 204136549
Fixes: 204572444
Change-Id: I57e00a4fb37f756c5190546867a9bf4a2837949c
2021-10-29 18:08:12 +00:00
Colin Cross
33066cde6b Merge "Make native bridge libc uninstallable" am: a62fd9d9ae
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1874144

Change-Id: I20d76ea6e9ce70d3ad17c94320fb535c239af5db
2021-10-29 15:18:49 +00:00
Colin Cross
a62fd9d9ae Merge "Make native bridge libc uninstallable" 2021-10-29 14:58:10 +00:00
Treehugger Robot
2465f37154 Merge "Don't open /dev/null until we need to." am: de6c4cd4e0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1869594

Change-Id: I201252b52c20ce297652e1f2d3fe5d95b9966eb9
2021-10-29 01:24:48 +00:00
Treehugger Robot
de6c4cd4e0 Merge "Don't open /dev/null until we need to." 2021-10-29 01:06:23 +00:00
Colin Cross
48efa5b8cd Make native bridge libc uninstallable
The native bridge libc.so is overridden by
//frameworks/libs/native_bridge_support/libc:libc, mark it
installable: false to avoid a collision in the install rules.
Allows removing BUILD_BROKEN_DUP_RULES from cuttlefish builds.

Bug: 204136549
Test: m checkbuild
Change-Id: I5379aa9595a714efdbe1ddc1ff4f65bb45fc67e8
2021-10-28 14:44:37 -07:00
Elliott Hughes
7a2386bf89 Don't open /dev/null until we need to.
This saves a couple of syscalls in the common case, and also lets static
binaries run in a chroot without /dev/null as long as
stdin/stdout/stderr are actually connected to something (which the
toybox maintainer tried to do).

Test: manual with strace
Change-Id: Ic9a28896a07304a3bd428acfd9ddca9d22015f6e
2021-10-28 09:55:27 -07:00
Yi Kong
44b13472fe Merge "Workaround Clang cannot build ifunc with LTO" am: d8854293d1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1864137

Change-Id: I8e69698604197a6be24f01b1c8a0be347e2beff9
2021-10-23 13:00:49 +00:00
Yi Kong
d8854293d1 Merge "Workaround Clang cannot build ifunc with LTO" 2021-10-23 12:47:26 +00:00
Yi Kong
b952a77e70 Workaround Clang cannot build ifunc with LTO
This is a KI: https://bugs.llvm.org/show_bug.cgi?id=46488

Bug: 203737712
Test: m GLOBAL_THINLTO=true bionic-unit-tests-static
Change-Id: I950a85f9676136299fc994a800d32e20bf12a8dd
2021-10-21 14:19:48 +00:00
Christopher Ferris
d7ab5c45d6 Merge "Add execinfo functionality." am: dc4b3789e6
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1863333

Change-Id: I1222ecc6e8ddef5ae7647d63416098c32241c157
2021-10-21 00:42:10 +00:00
Christopher Ferris
dc4b3789e6 Merge "Add execinfo functionality." 2021-10-21 00:25:24 +00:00
Christopher Ferris
11526e2fc6 Add execinfo functionality.
Bug: 27877410

Test: Add new unit tests.
Change-Id: Id5d7eb27a23f50e99a04f5ee1ab64047ba269bab
2021-10-20 21:53:07 +00:00
Treehugger Robot
58be47f2e6 Merge "Update bionic coverage docs." am: af2340a515
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1858259

Change-Id: I32996c6c6446522d874663296fc34229913b74b4
2021-10-19 05:05:11 +00:00
Treehugger Robot
af2340a515 Merge "Update bionic coverage docs." 2021-10-19 04:51:00 +00:00
Dan Albert
837b683b46 Update bionic coverage docs.
These docs refer to the old coverage workflow from the Android.mk
build.

AFAIK there's no way to get coverage for the host tests, so that part
was removed.

Test: followed the docs, got coverage data
Bug: None
Change-Id: Ibef5ae2d354296a77b752d3b7c9c48cf7a34ef98
2021-10-18 16:32:53 -07:00
Treehugger Robot
f5f55973c8 Merge "Add preadv2/pwritev2 wrappers." am: a3c6e7030c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1857393

Change-Id: Id8bb568563a3307b3be100bc49c7d96f0cba2ec4
2021-10-18 22:29:36 +00:00
Treehugger Robot
a3c6e7030c Merge "Add preadv2/pwritev2 wrappers." 2021-10-18 22:15:38 +00:00
Elliott Hughes
cf59e19e22 Add preadv2/pwritev2 wrappers.
They're in glibc, though not in musl.

Also add basic doc comments to the whole of <sys/uio.h>.

Bug: http://b/203002492
Test: treehugger
Change-Id: Ic607f7f349e5b7c9bf66c25b7bd68f827da530d6
2021-10-18 12:58:47 -07:00
Liz Kammer
14178ca2e7 Merge "Remove libc++demangle from static libs." am: ad60768bdf
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1854554

Change-Id: I6f07b91135a1271a68d39464dd050412b7b35582
2021-10-13 15:21:30 +00:00
Liz Kammer
ad60768bdf Merge "Remove libc++demangle from static libs." 2021-10-13 15:07:04 +00:00