Commit graph

35292 commits

Author SHA1 Message Date
Treehugger Robot
ed828cfb2e [automerger skipped] Merge "Fix Bionic dlfcn.dladdr_libc test case for 64bit binary translations" into android10-tests-dev am: 3382f346fc -s ours am: 7fad99971d -s ours am: b013f1698e -s ours
am skip reason: skipped by user rossyeh

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1164119

Change-Id: Iefbfb2034a76c1857fa205cc7d53230cacba75aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 19:00:07 +00:00
Automerger Merge Worker
45cb321127 Merge "Merge "Merge "Merge "Stop executing if skip occurs." into android10-tests-dev am: 1e4793561f" into android11-tests-dev am: 3596058918" into android12-tests-dev am: d55f2ce1ef" into android12L-tests-dev 2022-04-27 18:59:57 +00:00
Automerger Merge Worker
85814a6d2d Merge "Merge "Merge "Stop executing if skip occurs." into android10-tests-dev am: 1e4793561f" into android11-tests-dev am: 3596058918" into android12-tests-dev am: d55f2ce1ef
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1126826

Change-Id: Ie9e151f8485c6fe17422edf3177bacf2c994f26e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 18:59:56 +00:00
Automerger Merge Worker
60d6cfe283 Merge "Merge changes from topic "am-b2f669f2672c49a5b83a262bba261f9f" into android12-tests-dev am: d8a59345e1" into android12L-tests-dev 2022-04-27 18:59:49 +00:00
Automerger Merge Worker
bb39074a2c Merge changes from topic "am-b2f669f2672c49a5b83a262bba261f9f" into android12-tests-dev am: d8a59345e1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1466626

Change-Id: I924a1f432dd6aa2efc86740c25c079451f14389e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 18:59:47 +00:00
Automerger Merge Worker
9f1eb8a943 Merge changes from topic "am-eea3e96d84c34ba68e8c9263fc0b0332" into android12L-tests-dev
* changes:
  Merge "[automerger skipped] Merge changes I42a81210,I42ce2b5a,Id949c9e5 into android11-tests-dev am: 0d97015dbe -s ours" into android12-tests-dev am: f414cb356b
  [automerger skipped] Merge changes I42a81210,I42ce2b5a,Id949c9e5 into android11-tests-dev am: 0d97015dbe -s ours am: 6c706660e9 -s ours
2022-04-27 18:59:41 +00:00
Automerger Merge Worker
7e774d1d32 Merge "[automerger skipped] Merge changes I42a81210,I42ce2b5a,Id949c9e5 into android11-tests-dev am: 0d97015dbe -s ours" into android12-tests-dev am: f414cb356b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1431308

Change-Id: Ib4e18d83f42fbff9fc6f6ae119615ba8ad4065de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 18:59:38 +00:00
Treehugger Robot
9778932c7f [automerger skipped] Merge changes I42a81210,I42ce2b5a,Id949c9e5 into android11-tests-dev am: 0d97015dbe -s ours am: 6c706660e9 -s ours
am skip reason: skipped by user levarum

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1431308

Change-Id: I4c11e36bd5e77bc7e2f9dffb8aec8fb300888ebb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 18:59:37 +00:00
Evgenii Stepanov
1ec0946834 Regression test for scudo crash in resizeTaggedChunk.
This is a copy of the upstream scudo test for CTS:
https://reviews.llvm.org/rG913d78c40c37c9c3428285d868ce454b058e40f3

Bug: 206701345
Test: CtsBionicTestCases
Merged-In: I76b6b33c0665d7ad3bdd8c07d39a39d0d24d94df
Change-Id: I76b6b33c0665d7ad3bdd8c07d39a39d0d24d94df
(cherry picked from commit f0d7a34e25)
2021-11-17 15:00:54 -08:00
Treehugger Robot
b013f1698e [automerger skipped] Merge "Fix Bionic dlfcn.dladdr_libc test case for 64bit binary translations" into android10-tests-dev am: 3382f346fc -s ours am: 7fad99971d -s ours
am skip reason: skipped by user rossyeh

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1164119

Change-Id: Ica7b2ac60a2853ac7d2539c1a7c377d7faab59cb
2021-10-12 00:32:50 +00:00
Automerger Merge Worker
d55f2ce1ef Merge "Merge "Merge "Stop executing if skip occurs." into android10-tests-dev am: 1e4793561f" into android11-tests-dev am: 3596058918" into android12-tests-dev 2021-10-12 00:32:05 +00:00
Automerger Merge Worker
d021f26d49 Merge "Merge "Stop executing if skip occurs." into android10-tests-dev am: 1e4793561f" into android11-tests-dev am: 3596058918
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1126826

Change-Id: Iaa317d4e411e56e838ff8a71b77dd68efcf094a4
2021-10-12 00:32:04 +00:00
Automerger Merge Worker
d8a59345e1 Merge changes from topic "am-b2f669f2672c49a5b83a262bba261f9f" into android12-tests-dev
* changes:
  Merge "Skip pthread_leak* tests with native_bridge" into android11-tests-dev am: 867faac7ec
  Merge "Skip MTE tests with native_bridge" into android11-tests-dev am: f66f18fd99
2021-10-12 00:31:02 +00:00
Treehugger Robot
8574074e9b Merge "Skip pthread_leak* tests with native_bridge" into android11-tests-dev am: 867faac7ec
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1466626

Change-Id: Ie7df38023daff38edac6478a209e9d4417d876cb
2021-10-12 00:31:01 +00:00
Treehugger Robot
4585b605e3 Merge "Skip MTE tests with native_bridge" into android11-tests-dev am: f66f18fd99
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1466625

Change-Id: Icf165b1684a12fe5700b519a2ee597c66b6aa5dc
2021-10-12 00:31:00 +00:00
Automerger Merge Worker
f414cb356b Merge "[automerger skipped] Merge changes I42a81210,I42ce2b5a,Id949c9e5 into android11-tests-dev am: 0d97015dbe -s ours" into android12-tests-dev 2021-10-12 00:30:32 +00:00
Treehugger Robot
6c706660e9 [automerger skipped] Merge changes I42a81210,I42ce2b5a,Id949c9e5 into android11-tests-dev am: 0d97015dbe -s ours
am skip reason: skipped by user levarum

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1431308

Change-Id: Icfd49104cef8f5d274cd8a01ea5cc9008e460bc9
2021-10-12 00:30:19 +00:00
Xin Li
ba95279d36 [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: 1f637922e6 -s ours am: f83fcbcb01 -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546344

Change-Id: Ib8a594755ef47b3fec1febac187fae670dfb613b
2021-08-13 21:20:27 +00:00
Xin Li
f83fcbcb01 [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: 1f637922e6 -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546344

Change-Id: I207ce5881b3f64fc67e08b39543b787029c3959c
2021-08-13 20:53:31 +00:00
The Android Open Source Project
332e40de4e [automerger skipped] Merge ab/7633965 am: ad19c87f80 -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546708

Change-Id: If48afed66b2c159c6ef27b9e0fde2715a31615b6
2021-08-13 19:33:44 +00:00
Xin Li
1f637922e6 Merge stage-aosp-sc-ts-dev before making it an upstream
Bug: 169893837
Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
Change-Id: Ib15d857903753f890e6a75f2815a441359a81fc5
2021-08-13 18:18:34 +00:00
The Android Open Source Project
ad19c87f80 Merge ab/7633965
Bug: 169893837
Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
Change-Id: I4494985e98790e8934f10c8ba6f6f2207b3050ab
2021-08-12 22:45:46 +00:00
Bowgo Tsai
ab5c8dbdfe Revert "Adding system property tracing" am: c75fbc7b8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15353073

Change-Id: Ie4d44a33bcad9bb9cb7284f83f423a019eaef470
2021-07-28 14:53:55 +00:00
Bowgo Tsai
79eff3b3f0 Revert "bionic_systrace: moving global static variables" am: 2ebdb61620
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15353072

Change-Id: I64fcdf3d6ab229f38b8985042d68d04a26164f80
2021-07-28 14:53:54 +00:00
Bowgo Tsai
c75fbc7b8a Revert "Adding system property tracing"
Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Bug: 193050299
Test: build and boot a device
Change-Id: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
(cherry picked from commit 61a5a8380d)
2021-07-22 12:37:21 +08:00
Bowgo Tsai
2ebdb61620 Revert "bionic_systrace: moving global static variables"
This reverts commit 1e1c7845aa.

Reason for revert: makes property get/set non-reentrant

Bug: 193050299
Test: build and boot a device
Change-Id: If59e3dc25684a3c2b1d3ff74f995311afe6c6e89
Merged-In: If59e3dc25684a3c2b1d3ff74f995311afe6c6e89
(cherry picked from commit 3ec21f527a)
2021-07-22 12:37:00 +08:00
Christopher Ferris
bde9d6ba82 Fix race when frees after main thread finishes. am: e9b672b3e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15291503

Change-Id: I9f69a89b94f0b43ca034cea2ea3491980d486ce9
2021-07-15 19:58:24 +00:00
Christopher Ferris
e9b672b3e0 Fix race when frees after main thread finishes.
When the main thread is exiting, the code deleted the g_debug global
pointer and destroys the disable pthread key. Unfortunately, if
malloc debug was enabled in a way that requires a header for the pointer,
any frees that occur after the main thread is torn down result in calls
to the underlying allocator with bad pointers.
To avoid this, don't delete the g_debug pointer and don't destroy the
disable pthread key.

Added a new system test that allocates a lot of pointers and frees them
after letting the main thread finish.

Also, fix one test that can fail sporadically due to a lack of unwinding
information on arm32.

Bug: 189541929

Test: Passes new system tests.
Change-Id: I1cfe868987a8f0dc880a5b65de6709f44a5f1988
Merged-In: I1cfe868987a8f0dc880a5b65de6709f44a5f1988
(cherry picked from commit 33d73379aa)
2021-07-15 01:29:17 +00:00
TreeHugger Robot
b9f5f5c1de Merge "Make MTE tests pass with all values of MEMTAG_OPTIONS." into sc-dev am: 1986e6b936
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15273278

Change-Id: I420f0d5f869baf4fc8e57a3f4c0b04b2e41af963
2021-07-13 18:24:10 +00:00
TreeHugger Robot
1986e6b936 Merge "Make MTE tests pass with all values of MEMTAG_OPTIONS." into sc-dev 2021-07-13 17:59:10 +00:00
Evgenii Stepanov
72a91823c1 Make MTE tests pass with all values of MEMTAG_OPTIONS.
Do not assume that tests start with Sync MTE; check the initial setting
and change test logic as appropriate.

Bug: 192480262
Test: bionic-unit-tests with MEMTAG_OPTIONS=(off|sync|async)
Merged-In: Id80301e6426af16f89bd80a7a7ab127b6fd60425
Change-Id: Id80301e6426af16f89bd80a7a7ab127b6fd60425
(cherry picked from commit 53df1f3772)
2021-07-13 09:42:08 -07:00
Peter Collingbourne
8319192495 Merge "Allow the kernel to upgrade ASYNC mode processes to SYNC mode." into sc-dev am: 4683b11390
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15223414

Change-Id: I1d2c9ee783ebbe372758232307a76084f1c45616
2021-07-08 01:00:23 +00:00
Peter Collingbourne
4683b11390 Merge "Allow the kernel to upgrade ASYNC mode processes to SYNC mode." into sc-dev 2021-07-08 00:44:24 +00:00
Peter Collingbourne
f4f9259a1d Allow the kernel to upgrade ASYNC mode processes to SYNC mode.
On devices where the performance of ASYNC mode is similar to SYNC
mode on certain CPUs, OEMs may choose to configure the kernel to
prefer SYNC mode on those CPUs by writing the value "sync" to the
sysfs node: /sys/devices/system/cpu/cpu<N>/mte_tcf_preferred

The kernel will only respect the per-CPU preference if the user program
allows this by specifying the preferred mode as a member of a set of
allowed modes. Since only kernels with r.android.com/1754670 support
specifying multiple modes, fall back to trying to specify a single
mode if that doesn't work.

Bug: 189966263
Change-Id: Ie7ada3b073178b7967f0819cbdadc2d8e3a2c648
Merged-In: Ie7ada3b073178b7967f0819cbdadc2d8e3a2c648
2021-07-07 11:09:00 -07:00
Evgenii Stepanov
d7dc376eb9 Add definition of M_MEMTAG_TUNING. am: a44aa2e138
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15097261

Change-Id: I47dd4396b2b9ec3a053344ed0b091a6187b839d7
2021-06-24 22:21:37 +00:00
Evgenii Stepanov
a44aa2e138 Add definition of M_MEMTAG_TUNING.
Bug: 191769584
Test: N/A
Merged-In: Ief77f95a04411528563787a9fc6d10738fc5688f
Change-Id: Ief77f95a04411528563787a9fc6d10738fc5688f
(cherry picked from commit d8d561c984)
2021-06-24 12:15:13 -07:00
Nikita Ioffe
394cfd4d97 Explicitly set generate_hashtree: false am: 29045b3d7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/14969091

Change-Id: Idb6a3209929dc91e497e5a631a6132171b5ffe18
2021-06-15 21:34:14 +00:00
Nikita Ioffe
29045b3d7b Explicitly set generate_hashtree: false
Non-updatable APEXes are going to be only present on a dm-verity
protected read-only partition. For such APEXes there is no need in
embedding a hashtree.

This is a no-op change in preparation of switching default value of
generate_hashtree to true.

Bug: 190621617
Test: m
Change-Id: I426c1fce37ce63200810d69092660644e13291c2
Merged-In: I426c1fce37ce63200810d69092660644e13291c2
(cherry picked from commit 8f537e8762)
2021-06-15 01:52:08 +01:00
TreeHugger Robot
07a37c4ba7 Merge "Disable return PAC in __pthread_start." into sc-dev am: eb5f5d8db6
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/14911776

Change-Id: I89177a114df75e6d05dea8c5a4f13b0db4839058
2021-06-09 16:33:12 +00:00
TreeHugger Robot
d9a8756c70 Merge "Use ro.build.type instead of ro.debuggable" into sc-dev am: 381ed8f9d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/14907816

Change-Id: I42f24a47d09197f640ef1b212214e909d473cd40
2021-06-09 16:32:53 +00:00
TreeHugger Robot
eb5f5d8db6 Merge "Disable return PAC in __pthread_start." into sc-dev 2021-06-09 16:14:18 +00:00
Peter Collingbourne
9a1b7d1243 Disable return PAC in __pthread_start.
This function doesn't return, but it does appear in stack traces. Avoid
using return PAC in this function because we may end up resetting IA,
which may confuse unwinders due to mismatching keys.

Bug: 189808795
Change-Id: I953da9078acd1d43eb7a47fb11f75caa0099fa12
Merged-In: I953da9078acd1d43eb7a47fb11f75caa0099fa12
2021-06-08 18:41:36 -07:00
TreeHugger Robot
381ed8f9d2 Merge "Use ro.build.type instead of ro.debuggable" into sc-dev 2021-06-08 23:39:29 +00:00
Ryan Prichard
686a21937b Use ro.build.type instead of ro.debuggable
The LD_CONFIG_FILE test needs to match how Bionic was compiled, and
Bionic only enables LD_CONFIG_FILE for debug builds (i.e. ro.build.type
is "user"). ro.debuggable can be forced on without recompiling Bionic.

Bug: http://b/140324381
Bug: http://b/189422994
Test: bionic unit tests
Change-Id: I139059a7f94d15a5447dab292927606a6bcc48ef
(cherry picked from commit 546723b2b8)
2021-06-08 14:04:57 -07:00
Florian Mayer
054a61c27e Fix dangling pointer in heapprofd API. am: b887dc0b5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/14830782

Change-Id: I21dbe33547b63b10f3efab18a7ba2c880334c4ce
2021-06-04 15:41:54 +00:00
Florian Mayer
b887dc0b5c Fix dangling pointer in heapprofd API.
We would dlopen heapprofd_client.so, which has a static initializer [1]
that passes a pointer to of its functions to heapprofd_client_api.so.
If we dlclose heapprofd_client.so, this pointer is dangling.

[1]: https://cs.android.com/android/platform/superproject/+/master:external/perfetto/src/profiling/memory/malloc_interceptor_bionic_hooks.cc?q=symbol:g_heap_id

This is a cherry-pick of 85c7838bd9.

Bug: 189332777
Change-Id: Ia4a9d9dd7c89eceec86c6fac5f4b66de85d7604e
2021-06-04 11:15:27 +01:00
David Srbecky
a3b1926d75 Merge "Update API of MapInfo from libunwindstack" am: 453076b8d0 am: defbe6bfbd am: 7b89804d8a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1705416

Change-Id: I83c0ee90b3763476f9497139cf838e70b3348dbc
2021-05-13 10:40:57 +00:00
David Srbecky
7b89804d8a Merge "Update API of MapInfo from libunwindstack" am: 453076b8d0 am: defbe6bfbd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1705416

Change-Id: Iab72065969294c1259351272ba8eab78a5591f6d
2021-05-13 10:23:44 +00:00
David Srbecky
defbe6bfbd Merge "Update API of MapInfo from libunwindstack" am: 453076b8d0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1705416

Change-Id: If4599131c1ba63f1c9eb938483b78b2375baac7a
2021-05-13 10:08:14 +00:00
David Srbecky
453076b8d0 Merge "Update API of MapInfo from libunwindstack" 2021-05-13 09:49:52 +00:00