Commit graph

35705 commits

Author SHA1 Message Date
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
Liz Kammer
0d7d7ac01f Remove libc++demangle from static libs.
This is implicitly added by Soong with stl
https://cs.android.com/android/platform/superproject/+/master:build/soong/cc/stl.go;l=157;drc=cb0ac95bde896fa2aa59193a37ceb580758c322c

Test: m
Change-Id: Ie18a7cda8001deb3a0e714db02a50919e631c319
2021-10-12 13:42:36 -04:00
Chih-hung Hsieh
93a0affbcc Merge "Add/allow clang-14 warnings." am: aaf20e105c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1853700

Change-Id: Iaeecaff1de7a534dd17816add2f9619547a10612
2021-10-12 00:25:13 +00:00
Chih-hung Hsieh
aaf20e105c Merge "Add/allow clang-14 warnings." 2021-10-12 00:14:58 +00:00
Chih-Hung Hsieh
9935aa7a27 Add/allow clang-14 warnings.
* -Wstatic-in-inline found in
  libm/upstream-freebsd/lib/msun/src/s_lround.c

Test: mm in bionic/tests
Bug: 201432564
Bug: 202752322
Change-Id: I4d506fa539ab0de939d85924a5fd9a61644e4fb0
2021-10-11 12:37:56 -07:00
Daniele Di Proietto
cdeddf033b Merge "malloc_heapprofd: Avoid a spurious error log" am: 456eed0638
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1846387

Change-Id: I84faefcf72613f67c6270921e948e95fde38fc1e
2021-10-11 10:37:42 +00:00
Daniele Di Proietto
456eed0638 Merge "malloc_heapprofd: Avoid a spurious error log" 2021-10-11 10:17:07 +00:00
Daniele Di Proietto
b6d3c78244 malloc_heapprofd: Avoid a spurious error log
In the following scenario:

* Heapprofd wants to profile a process.
* The process receives the heapprofd signal, so it sets up the ephemeral
  hooks.
* The process does not perform any allocation, so the proper heapprofd
  hook is never installed.
* Heapprofd terminates.
* Now heapprofd wants to start a new profiling session.
* The process receives the heapprofd signal (again).

In the signal handler, no action is needed at this point. The ephemeral
hooks are already setup, so, at the next malloc, the proper heapprofd
hooks will be installed.

Before this commit, the code logged an error message, but still worked
correctly.

This commit basically just skips the error_log below.

Example of the error message that is now suppressed:

```
process: heapprofd: failed to transition kInitialState ->
kInstallingEphemeralHook. current state (possible race): 2
```

Tested by:
* Running a process that calls malloc on input from stdin.
* (Optional, tested both cases) Enable GWP-Asan by calling
  `android_mallopt(M_INITIALIZE_GWP_ASAN, ...`. The call will return
  success.
* Attaching heapprofd:
```
external/perfetto/tools/heap_profile -i 1 -p `adb shell pidof <...>`
```
* Detaching heapprofd (CTRL-C). The trace will be empty.
* (If not enabled before) Enabling GWP-Asan. The call will fail (because
  GWP-Asan detects heapprofd hooks).
* Reattaching heapprofd.
* Triggering some malloc()s in the process. The error log from above
  will not appear in `adb logcat`.
* Detaching heapprofd (CTRL-C). The trace will NOT be empty.

Bug: 192258849
Change-Id: I01699b10ecd19e52e1e77f83fcca955ebd885942
2021-10-07 17:25:00 +01:00
Steven Moreland
002cb0e674 Merge "Revert "strerror: incl enum name"" am: f72eb4e575 am: dd23725dcf am: bb8e09b276
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1847495

Change-Id: I3908b0b506b7062e644da8b1dbb12e5e39eedafc
2021-10-07 01:06:10 +00:00
Steven Moreland
bb8e09b276 Merge "Revert "strerror: incl enum name"" am: f72eb4e575 am: dd23725dcf
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1847495

Change-Id: I4ddf8f47bfbf07b8c0a3778b0e87db45636842bc
2021-10-07 00:54:02 +00:00
Steven Moreland
dd23725dcf Merge "Revert "strerror: incl enum name"" am: f72eb4e575
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1847495

Change-Id: I62f8bf789920c696822bad360a1316c62b770d70
2021-10-07 00:39:31 +00:00
Steven Moreland
f72eb4e575 Merge "Revert "strerror: incl enum name"" 2021-10-07 00:25:39 +00:00
Steven Moreland
4ef83d6919 Revert "strerror: incl enum name"
Revert submission 1833622-usable-strerror

Reason for revert: b/202330586
Bug: 202330586
Reverted Changes:
I4d8f617a0:Track strerror(3) change.
I8ea86220c:strerror: incl enum name
I407bd9f4d:strerror: incl enum name

Change-Id: I81ed563221a77827084711eadd7fb739aeba52a1
2021-10-07 00:19:18 +00:00
Elliott Hughes
41e6ea55c9 Merge "strerror: incl enum name" am: 71ab61902b am: 8afd4f34f1 am: 1c81493eab
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1833622

Change-Id: Ic386c26abb032541fedcc311d75a7ad0cfd975b1
2021-10-06 20:30:13 +00:00
Elliott Hughes
1c81493eab Merge "strerror: incl enum name" am: 71ab61902b am: 8afd4f34f1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1833622

Change-Id: Id28072b47dba04aeea1f4fe2838490f37cfe3cfe
2021-10-06 20:09:05 +00:00
Elliott Hughes
8afd4f34f1 Merge "strerror: incl enum name" am: 71ab61902b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1833622

Change-Id: I2aa12728395e9045db294b64f4edd2032af186a5
2021-10-06 19:53:46 +00:00
Elliott Hughes
71ab61902b Merge "strerror: incl enum name" 2021-10-06 19:35:51 +00:00
Steven Moreland
c3060de20f strerror: incl enum name
strerror is nice, but usually I don't care about the text, I care about
the uppercase enum

Bug: N/A
Test: ./tests/run-on-host.sh glibc (existing failures -> b/201305529)
Test: atest bionic-unit-tests-static
Test: atest malloc_debug_unit_tests

Change-Id: I407bd9f4dfa918fff66a0da7df8d7239f789c7b8
2021-10-05 11:12:30 -07:00
Elliott Hughes
5debadd648 Merge "Move ExecTestHelper to using a regex." am: b4d9304628 am: 617c4b5876 am: 60631ec17e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1843499

Change-Id: I6b42fc4b9e4be4bc3423886030f7b8f4e988c13e
2021-10-02 00:07:30 +00:00
Elliott Hughes
60631ec17e Merge "Move ExecTestHelper to using a regex." am: b4d9304628 am: 617c4b5876
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1843499

Change-Id: I34bf974569295f03e4ed5ee37fa515b0d5a69e84
2021-10-01 23:54:25 +00:00
Elliott Hughes
617c4b5876 Merge "Move ExecTestHelper to using a regex." am: b4d9304628
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1843499

Change-Id: I1c1f6cb3fe3930de9593cf531d49ca99681b59b6
2021-10-01 23:43:31 +00:00
Elliott Hughes
b4d9304628 Merge "Move ExecTestHelper to using a regex." 2021-10-01 23:31:05 +00:00
Christopher Parsons
e69fa65db9 Merge "Remove bazel_module stanzas from bionic/linker" am: 39c2776fff am: 4201548a9a am: c304168d97
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1842696

Change-Id: Ibd8665a4eacc0172a05c00e4df1beddb031bd4ea
2021-10-01 23:00:04 +00:00
Christopher Parsons
c304168d97 Merge "Remove bazel_module stanzas from bionic/linker" am: 39c2776fff am: 4201548a9a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1842696

Change-Id: Id5eff620b2c70779e190e26e728adcc12e2c9a0c
2021-10-01 22:42:47 +00:00
Christopher Parsons
4201548a9a Merge "Remove bazel_module stanzas from bionic/linker" am: 39c2776fff
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1842696

Change-Id: Ibe3045926690f69442f853069c445e8afd811b71
2021-10-01 22:21:38 +00:00