Commit graph

31498 commits

Author SHA1 Message Date
Peter Collingbourne
caf971b2ce Merge "Move crash_dump into the runtime APEX." am: ce8af7ff9e
Change-Id: I4726a88a6e28c5921e9e62a4316bbc499b14c139
2020-03-30 19:18:00 +00:00
Peter Collingbourne
ce8af7ff9e Merge "Move crash_dump into the runtime APEX." 2020-03-30 19:03:41 +00:00
Jiyong Park
ad9946c09a libc_header is available to any apex but only visible to certain places
The header library is used by some libraries, such as libunwind_llvm,
which are automatically added as dependencies when stl is set to
libc++_static. Since such dependencies are not specificy to any APEX,
let's mark the header library be available (can be directly or
indirectly be part of an APEX) to any APEX. At the same time, limit the
visibility of the header library so that its uses are strictly limited
to the certain places that we acknowledge. (the places would be reduced
further when we will be successful in dropping the dependency to
libc_headers.)

Bug: 152668052
Test: m
Change-Id: I85ee900947df2c9ce076e2f3aa3145645da77d2b
2020-03-30 18:36:07 +09:00
Florian Mayer
8ad6c9a6a7 Merge "dynamic libc: ignore ART profiling signal by default." am: e7221986c8 am: 5e19514751
Change-Id: I82053c9f9ccb717373f0f4b380fda315ee30488c
2020-03-28 10:36:08 +00:00
Florian Mayer
5e19514751 Merge "dynamic libc: ignore ART profiling signal by default." am: e7221986c8
Change-Id: I3de24d9efee4757bd6751ef0c269bf07577a499d
2020-03-28 10:24:37 +00:00
Florian Mayer
e7221986c8 Merge "dynamic libc: ignore ART profiling signal by default." 2020-03-28 10:15:32 +00:00
Christopher Ferris
881864628a Merge "Remove bionic-unit-tests-scudo." am: 9268f77bd7 am: ef1939d04a
Change-Id: Iad8791be4c3f1925bfd9d870b950288a04413135
2020-03-28 02:23:26 +00:00
Christopher Ferris
ef1939d04a Merge "Remove bionic-unit-tests-scudo." am: 9268f77bd7
Change-Id: Ic6f839cb7f9b1a25807cf193b33c8d291f2ee04b
2020-03-28 01:59:49 +00:00
Christopher Ferris
9268f77bd7 Merge "Remove bionic-unit-tests-scudo." 2020-03-28 01:48:54 +00:00
Ryan Prichard
40494406b8 Fix bootstrap linker library searching
For the bootstrap linker, insert /system/${LIB}/bootstrap in front of
/system/${LIB} in any namespace search path.

Bug: http://b/152572170
Test: bionic unit tests
Change-Id: Ia359d9f2063f4b6fff3f79b51b500ba968a18247
2020-03-27 18:46:28 -07:00
Ryan Prichard
4fa6d9978a Remove dangling soinfo* from elf_readers_map_
If ElfReader::Read fails, then it is hazardous to leave the invalid
ElfReader in the soinfo*->ElfReader table, because a future soinfo
object could happen to have the same address, then reuse the invalid
ElfReader. I'm not sure whether this can break anything, because the
linker would call ElfReader::Read on the invalid object and overwrite
its previous value.

Test: bionic unit tests
Bug: none
Change-Id: Ibabbf559443441b9caeacc34ca165feaafe5e3a7
2020-03-27 18:46:28 -07:00
Ryan Prichard
146620b644 Fix DL_WARN_documented_change URL
The doc_link argument is really a URL fragment within the
android-changes-for-ndk-developers.md document, not a filename at the
root of the bionic repository.

Test: manual
Bug: none
Change-Id: I1b542e47aca132ce43ba1d50d83db1bf3c7b10c6
2020-03-27 18:46:28 -07:00
Ryan Prichard
323d7dfe90 remove search_linked_namespaces param
The search_linked_namespaces parameter to find_library_internal is
always true.

Bug: none
Test: bionic tests
Change-Id: I4b6f48afefca4f52b34ca2c9e0f4335fa895ff34
2020-03-27 18:46:28 -07:00
Ryan Prichard
aa2db969dc Refactor linker lookup code a bit
Add a few _Nonnull / _Nullable annotations. Clang may use them to issue
warnings but violating the annotation isn't undefined behavior.

Bug: none
Test: bionic tests
Change-Id: I82e442f06a2c59c69bc0008f0f686785695cdd02
2020-03-27 18:46:28 -07:00
Christopher Ferris
ca885cf249 Remove bionic-unit-tests-scudo.
This is not used at all any more since we've switched to scudo.

Test: Builds.
Change-Id: Iff0b7d4a5ea12103a68ad038de2d82bf5f864285
2020-03-27 17:04:30 -07:00
Florian Mayer
96272df35c dynamic libc: ignore ART profiling signal by default.
These solves the issue that targetting non-profilable apps crashed them.
There is still a race condition between starting the app and the SIG_IGN
being installed, but that will be fixed in follow-ups.

This also does not cover programs that statically link libc, but those are
rare.

This might be reverted if we find a more general solution to
b/151835887.

Bug: 151328035
Test: java profile sysui, doesn't crash
Test: atest CtsBionicTestCases

Change-Id: I6b99352ed50afe15a609f7ddb85312c2676ddf11
2020-03-27 19:22:00 +01:00
Treehugger Robot
610e70e96f Merge "[GWP-ASan] Add gwp_asan_unittest to bionic presubmit." am: 2ec66b6a6a am: 22eebd8be1
Change-Id: I5a0638496190804f79fd29360c39434b27721f98
2020-03-26 23:39:37 +00:00
Treehugger Robot
22eebd8be1 Merge "[GWP-ASan] Add gwp_asan_unittest to bionic presubmit." am: 2ec66b6a6a
Change-Id: I1648efe7dd38445b8bffaeb390f82066be76cf65
2020-03-26 23:22:38 +00:00
Treehugger Robot
2ec66b6a6a Merge "[GWP-ASan] Add gwp_asan_unittest to bionic presubmit." 2020-03-26 23:05:38 +00:00
Treehugger Robot
c378bef962 Merge "Add ffsl(3), ffsll(3)." am: e05c449cd8 am: 38977771b3
Change-Id: I19de19830c53d1a3d9c64f1bff98498f4ecb7413
2020-03-26 22:09:54 +00:00
Treehugger Robot
38977771b3 Merge "Add ffsl(3), ffsll(3)." am: e05c449cd8
Change-Id: I476c3cb1139e49f8788f8ea12c31c6d6c70d8491
2020-03-26 22:00:52 +00:00
Treehugger Robot
e05c449cd8 Merge "Add ffsl(3), ffsll(3)." 2020-03-26 21:14:36 +00:00
Mitch Phillips
cbf016504b [GWP-ASan] Add gwp_asan_unittest to bionic presubmit.
bionic libc has a dependency on GWP-ASan. Changes in bionic can also
affect GWP-ASan (e.g. GWP-ASan requires some headers from bionic for
tests). Resultingly, we shouldn't accidentally break GWP-ASan through
changes to bionic by adding this as a presubmit check.

Bug: 152414185
Test: cd bionic && atest
Change-Id: I15dac9da6a7b8dbba453cfabec995d79a0f71924
2020-03-26 13:23:19 -07:00
Elliott Hughes
4a6899ce0c Add ffsl(3), ffsll(3).
POSIX added these GNU extensions for issue 8.

I've made these always inline without the usual "until API level X"
proviso because they're single instructions that the compiler can inline
and there's really no point providing these if they add function call
overhead --- everyone should just use __builtin_ffs() and friends
instead in that case.

Bug: https://austingroupbugs.net/view.php?id=617
Test: treehugger
Change-Id: I33fc4b8648ea25917329e81c1b4c60eb9a66d667
2020-03-26 11:43:05 -07:00
Treehugger Robot
a05c0493f0 Merge "Set apex_available property" am: 4b466292d0 am: 7505b5cb7a
Change-Id: I77c7d386772b42375a144b056515f4b96e2c384a
2020-03-26 10:42:15 +00:00
Treehugger Robot
7505b5cb7a Merge "Set apex_available property" am: 4b466292d0
Change-Id: I038efa664ad419071f7a8cb8e7a1d52bb54f5f34
2020-03-26 10:31:15 +00:00
Treehugger Robot
4b466292d0 Merge "Set apex_available property" 2020-03-26 10:16:03 +00:00
Treehugger Robot
0d9fdf1aee Merge "[GWP-ASan] Allow libc header access from GWP-ASan." am: 284d93c83c am: cf984536c8
Change-Id: I61bcea0f5c14291b77e7d64da4c4ef46e1b7f153
2020-03-26 01:50:21 +00:00
Hans Boehm
45f62fa624 Merge "Increase iteration count for ordering test" am: a1ab838acc am: 56b79bbf4b
Change-Id: I3a094c4e19423dc2dad7fa40f420b91da318306a
2020-03-26 01:50:12 +00:00
Treehugger Robot
cf984536c8 Merge "[GWP-ASan] Allow libc header access from GWP-ASan." am: 284d93c83c
Change-Id: I85b4e5d61f72d98485f67f605e99f798c3f52447
2020-03-26 01:36:21 +00:00
Hans Boehm
56b79bbf4b Merge "Increase iteration count for ordering test" am: a1ab838acc
Change-Id: Ic755043b2a531aebdbbfc5bc0bf0cfc69709d443
2020-03-26 01:35:53 +00:00
Treehugger Robot
284d93c83c Merge "[GWP-ASan] Allow libc header access from GWP-ASan." 2020-03-26 01:24:36 +00:00
Hans Boehm
a1ab838acc Merge "Increase iteration count for ordering test" 2020-03-26 01:21:19 +00:00
Mitch Phillips
3309b3dbb9 [GWP-ASan] Allow libc header access from GWP-ASan.
GWP-ASan is part of libc, and the tests (in future) will have to access
the internal headers of libc (particularly, the frame pointer unwinder).

Allow GWP-ASan to have access to the header package.

Bug: 152414185
Test: N/A
Change-Id: I09f771a667be867ec0acc90ddd6b52a432098c57
2020-03-25 15:05:48 -07:00
Hans Boehm
376106436c Increase iteration count for ordering test
This should make it less likely that the writer finishes before the
reader even starts. It makes the test run longer, but devices have
gotten faster suince this test was written.

Bug: 152218463
Test: Treehugger
Change-Id: I409e59071991095fb17e067760f2a5f29ede0ba2
2020-03-25 12:50:21 -07:00
Jiyong Park
922a5c7d75 Set apex_available property
The marked library(ies) were available to the APEXes via the hand-written
whitelist in build/soong/apex/apex.go. Trying to remove the whitelist
by adding apex_available property to the Android.bp of the libraries.

Bug: 150999716
Test: m
Change-Id: Id5691b02c107ed7b844a186f0a5effa3cb0fe52a
2020-03-25 09:22:22 +09:00
Tom Cherry
7971d2ddc4 Merge "Remove ANDROID_LOG_RDONLY" am: 2c1b058aaa am: b07d524ac0
Change-Id: I4c8f73adbdfbbfdb327fb9e7c711711f0ba91d00
2020-03-24 21:26:48 +00:00
Tom Cherry
b07d524ac0 Merge "Remove ANDROID_LOG_RDONLY" am: 2c1b058aaa
Change-Id: I2e7a2e104ec0ef914e9a9a6ec1e004c1e0452f53
2020-03-24 21:13:16 +00:00
Tom Cherry
2c1b058aaa Merge "Remove ANDROID_LOG_RDONLY" 2020-03-24 21:00:57 +00:00
TreeHugger Robot
2af4cbbe06 Merge "Move crash_dump into the runtime APEX." into qt-qpr1-dev-plus-aosp 2020-03-24 16:57:12 +00:00
Tom Cherry
1995d74baa Remove ANDROID_LOG_RDONLY
This macro hasn't been meaningful in years.

Test: logging unit tests
Change-Id: I849a466052524c24f1dba585a6423e80198c6b9c
2020-03-23 13:41:06 -07:00
Treehugger Robot
49c8ed60d5 Merge "Rewrite sigwait tests in the style of the sigwaitinfo tests." am: 8d1849930f am: 23468ea95f
Change-Id: Ic266efc921bc792ed4e82a3e2514352887f471a1
2020-03-21 02:05:55 +00:00
Treehugger Robot
23468ea95f Merge "Rewrite sigwait tests in the style of the sigwaitinfo tests." am: 8d1849930f
Change-Id: Ifd4462b41564492ba49b433b9631589231ecd3c4
2020-03-21 01:50:11 +00:00
Treehugger Robot
8d1849930f Merge "Rewrite sigwait tests in the style of the sigwaitinfo tests." 2020-03-21 01:36:16 +00:00
Treehugger Robot
26125dfcee Merge "Clean up untag_address." am: 0ebbed2347 am: 01c90dcf9f
Change-Id: Ief2e0eaccc453fac4080d2d905cb477685684c52
2020-03-21 00:54:35 +00:00
Treehugger Robot
01c90dcf9f Merge "Clean up untag_address." am: 0ebbed2347
Change-Id: Ic17e2760e86d2e2438dd090a0f8c9aa7b1fb2611
2020-03-21 00:40:26 +00:00
Treehugger Robot
0ebbed2347 Merge "Clean up untag_address." 2020-03-21 00:22:38 +00:00
Elliott Hughes
50fca4d2bd Rewrite sigwait tests in the style of the sigwaitinfo tests.
I can't reproduce locally, but treehugger is seeing 6% flake in the
signal.sigwait64_SIGRTMIN test. It's the only test in the file with a
sleep() in it, which always makes me suspicious, and we aren't having
trouble with the (in principle) very similar sigwaitinfo() tests, so
switch over to their style.

Bug: http://b/149934069
Test: treehugger
Change-Id: I2a1193b0cbec50f6548badf7dc7175bb6a49e45f
2020-03-20 16:27:57 -07:00
Peter Collingbourne
2528dab741 Clean up untag_address.
We had two copies of this function, one (not quite correct) in tests/utils.h
and another in bionic/macros.h. Delete the former and have the users include
the latter.

Also, create an overload of the function that takes a uintptr_t, which will
be useful for out-of-process scenarios such as the MTE support in debuggerd.

Bug: 135772972
Change-Id: Ia3c2652c97797663146b3f05fa786afe09f7ea97
2020-03-20 15:35:54 -07:00
Xin Li
374a5a0a66 DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am: d9acd40f39
Change-Id: I8dc208f6a02d8d01941cb2723ecb7f0c5c0e513a
2020-03-19 04:25:31 +00:00