Commit graph

35405 commits

Author SHA1 Message Date
Christopher Ferris
653df690bb Merge "Read the log while test runs instead of after." am: e397e49aa7 am: 41c20fb8d7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775665

Change-Id: I713b646236a10a309234d3dfcd7bd7c627dbc0c1
2021-07-23 22:47:39 +00:00
Christopher Ferris
41c20fb8d7 Merge "Read the log while test runs instead of after." am: e397e49aa7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775665

Change-Id: I19f7634402b2c3faca0813578d4749550ee014b3
2021-07-23 22:15:35 +00:00
Christopher Ferris
e397e49aa7 Merge "Read the log while test runs instead of after." 2021-07-23 21:53:32 +00:00
Treehugger Robot
63e3f9b200 Merge "Rename cc_object default_shared_libs to system_shared_libs" am: 3367bf3412 am: 86c150bea1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773166

Change-Id: I63c089274e6e90965117497de054e7e9a4cfba35
2021-07-23 21:28:09 +00:00
Treehugger Robot
86c150bea1 Merge "Rename cc_object default_shared_libs to system_shared_libs" am: 3367bf3412
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773166

Change-Id: I2d563a61b147b46cc479363058864c063f93257b
2021-07-23 21:25:06 +00:00
Treehugger Robot
3367bf3412 Merge "Rename cc_object default_shared_libs to system_shared_libs" 2021-07-23 21:18:51 +00:00
Christopher Ferris
4990c2dcbb Read the log while test runs instead of after.
These tests can be flaky if something is spamming the log and
expiring messages. Previously, the log wasn't read until the
forked process was complete. Now, two threads are spawned right
after the process forks to read the log while running. This
should avoid any problems if the log is being spammed while the
test runs.

In addition, fixed some potential flakiness in the test that might
occur if the test incorrectly gets stale log data.

Bug: 193898572

Test: All unit tests pass on cuttlefish (both 32 bit and 64 bit).
Test: Forced an abort and verified that the crash log reader sees
Test: the message.
Test: Verified that the log reader for the main and crash log properly
Test: read data.
Test: Verified the test passes while swamping the log by running
Test: the log unit tests while running two copies of the system
Test: tests.
Change-Id: I68bd92a8c483eac0146ada87dd4201dda0902c49
2021-07-23 11:48:29 -07:00
Bowgo Tsai
b6cb168674 [automerger skipped] Revert "Adding system property tracing" am: c75fbc7b8a -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 61a5a8380d is already in history

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

Change-Id: Ifc84eb104986969ff7f5da61adf2713e75d28d57
2021-07-23 18:12:40 +00:00
Bowgo Tsai
9a2d3cac37 [automerger skipped] Revert "bionic_systrace: moving global static variables" am: 2ebdb61620 -s ours
am skip reason: Merged-In If59e3dc25684a3c2b1d3ff74f995311afe6c6e89 with SHA-1 3ec21f527a is already in history

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

Change-Id: Ied2856102c8310ccae1d63e213b602e0e5ab4b5c
2021-07-23 18:12:39 +00:00
Joel Galenson
11fa022647 Merge changes from topic "rust-property-bindings" am: a67c7fdca8 am: 0504d629aa
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773608

Change-Id: I396b2c42804abf0b3f260db2610aa2158a6fd90d
2021-07-23 15:22:21 +00:00
Joel Galenson
75989112f5 Migrate keystore2's Rust system library bindings to bionic. am: e1f1e79310 am: 13e81f8712
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773607

Change-Id: Ic13580d7167049288dbb0c30bf6cd3718fcd2543
2021-07-23 15:22:19 +00:00
Joel Galenson
0504d629aa Merge changes from topic "rust-property-bindings" am: a67c7fdca8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773608

Change-Id: I89e98a821a6ca7735b0f7e1e2b24e9a8836d9f76
2021-07-23 15:04:57 +00:00
Joel Galenson
13e81f8712 Migrate keystore2's Rust system library bindings to bionic. am: e1f1e79310
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773607

Change-Id: I6e088ac03ce5e98a81b335456fd6f6a43269ac05
2021-07-23 15:04:54 +00:00
Joel Galenson
a67c7fdca8 Merge changes from topic "rust-property-bindings"
* changes:
  Improve the Rust property bindings.
  Migrate keystore2's Rust system library bindings to bionic.
2021-07-23 14:46:55 +00:00
Christopher Ferris
b7b14b73b0 Merge "Fix NOTICE file." am: e780ad0c24 am: 103efe0c08
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775588

Change-Id: I0e84b6e3899f790009f42445f8d074905442a2a5
2021-07-23 05:57:17 +00:00
Christopher Ferris
103efe0c08 Merge "Fix NOTICE file." am: e780ad0c24
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775588

Change-Id: I55dc3bb98b057fe0e2b257dada9c142b58d40d67
2021-07-23 05:38:42 +00:00
Christopher Ferris
e780ad0c24 Merge "Fix NOTICE file." 2021-07-23 05:19:07 +00:00
Christopher Ferris
5c49616f70 Fix NOTICE file.
Test: Uploads.
Change-Id: I23fb9413dd62aa06ffa26e5e7fc0f7e26fa8cde4
2021-07-22 22:37:19 +00:00
Colin Cross
02f813703a Rename cc_object default_shared_libs to system_shared_libs
default_shared_libs has been removed, go back to the system_shared_libs
property that now has the same behavior.

Bug: 193559105
Test: m checkbuild
Change-Id: I9edac93f7e6d9d4b99883b7a7b14ab52942c0ef2
2021-07-22 12:02:10 -07:00
Treehugger Robot
a9519cd8bc Merge "Move system_shared_libs into target.bionic clause" am: 2ffa0eb7d3 am: 9328d2f1d8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1764658

Change-Id: Ie784751c7ec83aea0a00b2133e0402a7877d30e6
2021-07-22 19:00:11 +00:00
Treehugger Robot
9328d2f1d8 Merge "Move system_shared_libs into target.bionic clause" am: 2ffa0eb7d3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1764658

Change-Id: I0b2facf4a49d0683683be9ba12f5f975fa7018b5
2021-07-22 18:28:58 +00:00
Treehugger Robot
2ffa0eb7d3 Merge "Move system_shared_libs into target.bionic clause" 2021-07-22 17:44:32 +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
Joel Galenson
4aebf55257 Improve the Rust property bindings.
Add a utility function to get the current value of a property and
remove some keystore2-specific strings.

Bug: 182498247
Test: Build
Change-Id: Ie7e9903546a4d4cd6c54a118c42257a23510dda6
2021-07-21 15:21:29 -07:00
Joel Galenson
e1f1e79310 Migrate keystore2's Rust system library bindings to bionic.
This is purely a port: it does not add or change any functionality
(other than renaming the library).

Bug: 182498247
Test: Use library.
Change-Id: I4cb8f1c22ca4ca5a398116952fb9957d283d235b
2021-07-21 15:21:27 -07:00
Treehugger Robot
17b40a00de [automerger skipped] Merge changes from topic "revert_sysprop_trace" am: dc42a98763 -s ours am: 7d657de0bd -s ours
am skip reason: Merged-In Id2b93acb2ce02b308c0e4889f836159151af3b46 with SHA-1 16d5161a43 is already in history. Merged-In was found from reverted change.

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

Change-Id: I731f62c5dac391e5dddb2dbdf53839859cca2bf1
2021-07-21 12:05:51 +00:00
Treehugger Robot
7d657de0bd [automerger skipped] Merge changes from topic "revert_sysprop_trace" am: dc42a98763 -s ours
am skip reason: Merged-In Id2b93acb2ce02b308c0e4889f836159151af3b46 with SHA-1 16d5161a43 is already in history. Merged-In was found from reverted change.

Reverted change: https://android-review.googlesource.com/c/platform/bionic/+/1403568

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

Change-Id: Iec76c426cc183b92f9d4efca62c886c101129ddd
2021-07-21 11:56:23 +00:00
Treehugger Robot
dc42a98763 Merge changes from topic "revert_sysprop_trace"
* changes:
  Revert "Adding system property tracing"
  Revert "bionic_systrace: moving global static variables"
2021-07-21 11:43:39 +00:00
Bowgo Tsai
8f14b65032 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-21 09:15:41 +08:00
Bowgo Tsai
13a960f0ed 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-21 09:10:41 +08:00
TreeHugger Robot
b285176e58 Merge changes from topic "revert_sysprop_trace-sc-dev-plus-aosp" into sc-dev-plus-aosp
* changes:
  Revert "Adding system property tracing"
  Revert "bionic_systrace: moving global static variables"
2021-07-20 16:30:20 +00:00
Christopher Ferris
f9be3797de Merge "Avoid undefined compiler behavior" am: 98115b7494 am: d5baa2bffa
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1768648

Change-Id: I2ccd631366762d384b230af78d4f022e199a84cf
2021-07-16 06:45:53 +00:00
Christopher Ferris
d5baa2bffa Merge "Avoid undefined compiler behavior" am: 98115b7494
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1768648

Change-Id: Ic248dc211231afb7792bc459407b1d41efa783a9
2021-07-16 06:30:57 +00:00
Christopher Ferris
98115b7494 Merge "Avoid undefined compiler behavior" 2021-07-16 06:18:28 +00:00
Christopher Ferris
a6035ecd41 Avoid undefined compiler behavior
This is a follow-on to commit 5358cc40ab.
I forgot that there were two places the undefined behavior could occur.

Make the literal unsigned in the other place.

Test: TreeHugger
Bug: 189541929
Change-Id: Iaef81507ca61e802d277246bf5995157c93d86ce
2021-07-15 12:58:07 -07:00
Christopher Ferris
d4c01e79db [automerger skipped] Fix race when frees after main thread finishes. am: e9b672b3e0 -s ours
am skip reason: Merged-In I1cfe868987a8f0dc880a5b65de6709f44a5f1988 with SHA-1 33d73379aa is already in history

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

Change-Id: If10f97861fd26a4d349ae9dbbe6669b316c15368
2021-07-15 19:57:17 +00:00
Treehugger Robot
10bcf0f6a6 Merge "Avoid undefined compiler behavior" am: 2e4be55966 am: 242aecc17e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1768285

Change-Id: Icca68b4488ea94749e8a95a0abdf30aacd52fd2c
2021-07-15 19:51:45 +00:00
Treehugger Robot
242aecc17e Merge "Avoid undefined compiler behavior" am: 2e4be55966
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1768285

Change-Id: I853671b7def54d6e495f38ce0f169ad06dceb694
2021-07-15 19:33:47 +00:00
Treehugger Robot
2e4be55966 Merge "Avoid undefined compiler behavior" 2021-07-15 18:55:52 +00:00
Greg Kaiser
5358cc40ab Avoid undefined compiler behavior
Technically, shifting a signed value beyond its maximum range is
undefined behavior in C++.  A bare integer literal is signed, and
defaults to 'int'.  On platforms where 'int' is 32-bits, we
shift outside this range with 1 << 31.

We make our literal an unsigned integer to avoid this.

Test: TreeHugger
Bug: 189541929

Change-Id: Iade1bcd3f86d025dd6e10c26622d10c26e2c8295
2021-07-15 08:34:18 -07:00
Bowgo Tsai
61a5a8380d 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
2021-07-15 20:55:55 +08:00
Bowgo Tsai
3ec21f527a 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
2021-07-15 20:55:47 +08:00
Christopher Ferris
f1df8fba72 Merge "Fix race when frees after main thread finishes." am: 48e981556e am: 80232a7145
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1755319

Change-Id: I14f71e5cc388cb8c6aa257e0f8cee198d3e1d869
2021-07-15 09:01:55 +00:00
Christopher Ferris
80232a7145 Merge "Fix race when frees after main thread finishes." am: 48e981556e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1755319

Change-Id: I97f767ba2b220164c140c5c848635a9ca73599d9
2021-07-15 03:25:07 +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
Christopher Ferris
48e981556e Merge "Fix race when frees after main thread finishes." 2021-07-15 01:16:45 +00:00
Colin Cross
4b6dd39e3c Merge "Define sockaddr_storage in bionic" am: d8b97f48c1 am: 3d4251bf70
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1748129

Change-Id: I5fad426d2ff52e476a1458b57a01a95907c65e55
2021-07-15 00:29:15 +00:00
Colin Cross
3d4251bf70 Merge "Define sockaddr_storage in bionic" am: d8b97f48c1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1748129

Change-Id: I40e6af7b85d558f929b7b22fd10c3ccca1b4da8b
2021-07-15 00:12:49 +00:00
Colin Cross
d8b97f48c1 Merge "Define sockaddr_storage in bionic" 2021-07-14 23:59:08 +00:00