Commit graph

35547 commits

Author SHA1 Message Date
Colin Cross
691b891d9c Merge "Convert bionic dlext test zips to Android.bp" am: 7b40b4dda0 am: 6f7870742e am: a9937042aa
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1838353

Change-Id: I0aba2dd3759c0eb2da27b5f72f7f62e3f956c2f5
2021-10-01 17:21:41 +00:00
Colin Cross
a9937042aa Merge "Convert bionic dlext test zips to Android.bp" am: 7b40b4dda0 am: 6f7870742e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1838353

Change-Id: I87b2124839f8b07bfa6a5d1c7d26c4e26947158d
2021-10-01 17:03:23 +00:00
Colin Cross
6f7870742e Merge "Convert bionic dlext test zips to Android.bp" am: 7b40b4dda0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1838353

Change-Id: I8f4f3cc333c9a9709ad323b58813d716ac7c818f
2021-10-01 16:46:26 +00:00
Colin Cross
7b40b4dda0 Merge "Convert bionic dlext test zips to Android.bp" 2021-10-01 16:27:54 +00:00
Colin Cross
badcb38d3c Convert bionic dlext test zips to Android.bp
Use cc_genrules to create the dlext test zips needed by the bionic
tests.  The genrules aren't visible to Make, and so don't work with
the `required` property.  Move all of the dependencies to `data_bins`,
`data_libs` or `data` for helper binaries, shared libraries or
genrule zip files respectively.  The `data*` properties copy the
files into the same directory as a test, respecting the
`bionic-loader-test-libs` relative path specified by each, but
does not put each helper binary in its own subdirectory, so update
the paths in each of the tests.

Bug: 200872604
Test: atest CtsBionicTestCases
Test: atest bionic-unit-tests
Test: cts-tradefed run commandAndExit cts -m CtsBionicTestCases
Test: adb push $OUT/data/nativetest/bionic-unit-tests /data/nativetest/ && adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
Change-Id: Ic4257cb4104ff558326df2363730acd20464b051
2021-09-30 14:04:27 -07:00
Treehugger Robot
0f202b1bfc Merge "Treat static binaries "the same" for the profiling signals." am: 5b4913a599 am: cb38a389dd am: 7a07c96338
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1840754

Change-Id: I6b3b8e44b9df7c70bcb2f1c5a5d6d460e47c356e
2021-09-30 17:23:52 +00:00
Treehugger Robot
7a07c96338 Merge "Treat static binaries "the same" for the profiling signals." am: 5b4913a599 am: cb38a389dd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1840754

Change-Id: I88fd2d8e22de3ac8226c04cf9ba88464c089d879
2021-09-30 17:11:50 +00:00
Treehugger Robot
cb38a389dd Merge "Treat static binaries "the same" for the profiling signals." am: 5b4913a599
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1840754

Change-Id: I6dece10d59d8560c8049f21d47195f0cdbfa5cbf
2021-09-30 16:57:36 +00:00
Treehugger Robot
5b4913a599 Merge "Treat static binaries "the same" for the profiling signals." 2021-09-30 16:45:49 +00:00
Lalit Maganti
f6a1b8e038 Merge "bionic: fix broken end atrace events" am: e8cc2c32ac am: 276e49cb89 am: 2b316e99a2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1810418

Change-Id: I38c2b1298742e5570d0de96a8cbfdc238eaae42c
2021-09-30 11:26:48 +00:00
Lalit Maganti
2b316e99a2 Merge "bionic: fix broken end atrace events" am: e8cc2c32ac am: 276e49cb89
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1810418

Change-Id: I1b68c7f9b26a4dce2210bf892cebdf9b3d196d80
2021-09-30 11:13:22 +00:00
Lalit Maganti
276e49cb89 Merge "bionic: fix broken end atrace events" am: e8cc2c32ac
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1810418

Change-Id: I7ed065c8ab5f4a51e92221560f2fb887d08c3bb6
2021-09-30 10:59:40 +00:00
Lalit Maganti
e8cc2c32ac Merge "bionic: fix broken end atrace events" 2021-09-30 10:45:38 +00:00
Elliott Hughes
377193745d Treat static binaries "the same" for the profiling signals.
Strictly this still isn't quite the same, because they won't actually be
profiled, but at least they won't *crash* now if they're sent a
profiling signal.

Bug: http://b/201497662
Test: treehugger
Change-Id: I0728492eed77584cd850d28897056996387e6671
2021-09-29 17:10:02 -07:00
Lalit Maganti
2aa3f7cb26 bionic: fix broken end atrace events
When calling write on an FD for trace_marker, it is expected that the
pointer passed will be paged into memory. If this isn't the case, the
kernel will ignore the string passed and instead write "<faulted>" to
the ring buffer.

For end events, we were passing a constant string which resides in
the rodata section of the ELF file. If this section is paged out, we
end up not closing atrace stacks correctly leading to very broken traces.

For even more context, see the associated bug.

Fix this issue by reading the constant string to the stack first
which should mean the string is always paged in.

Bug: 197620214
Change-Id: I6a444ac6fe83a6a9fb696c5621e392eca7e9437a
2021-09-29 18:33:27 +01:00
Evgenii Stepanov
da1c8daabe Merge "Add CtsBionicTestCases to hwasan-postsubmit." am: c6b6f5e7ef am: 2ebb8f465f am: 622d4df0ad
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1836409

Change-Id: Ifb226e7d791ac9afab27a5d65d124aa3e3e91bf6
2021-09-24 23:05:21 +00:00
Evgenii Stepanov
d638363012 Merge "Random HWASan cleanups." am: b34d313d17 am: 2014e706a6 am: 61e28ccec2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1830382

Change-Id: I7c1b2d314de2298e36ee6e6966ae1e440b4f3cea
2021-09-24 23:05:16 +00:00
Evgenii Stepanov
622d4df0ad Merge "Add CtsBionicTestCases to hwasan-postsubmit." am: c6b6f5e7ef am: 2ebb8f465f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1836409

Change-Id: If9b1de78be8d2fad119ff8f4c77074dc174def2d
2021-09-24 22:50:11 +00:00
Evgenii Stepanov
61e28ccec2 Merge "Random HWASan cleanups." am: b34d313d17 am: 2014e706a6
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1830382

Change-Id: I19706d5e77dc50d36edaa66a3afebd29786392cb
2021-09-24 22:49:41 +00:00
Evgenii Stepanov
2ebb8f465f Merge "Add CtsBionicTestCases to hwasan-postsubmit." am: c6b6f5e7ef
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1836409

Change-Id: I60abf556feb11f474620d33e4a57e48171a95801
2021-09-24 22:33:02 +00:00
Evgenii Stepanov
2014e706a6 Merge "Random HWASan cleanups." am: b34d313d17
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1830382

Change-Id: If9ace9c23ccaff70f9022ab090886f28ebc9a74c
2021-09-24 22:32:57 +00:00
Evgenii Stepanov
c6b6f5e7ef Merge "Add CtsBionicTestCases to hwasan-postsubmit." 2021-09-24 22:21:26 +00:00
Evgenii Stepanov
b34d313d17 Merge "Random HWASan cleanups." 2021-09-24 22:15:43 +00:00
Evgenii Stepanov
1d7077a1ce Add CtsBionicTestCases to hwasan-postsubmit.
Bug: 193568145
Test: none

Change-Id: I8aa9b9d299973600e7488aeae93b92f59776d5e5
2021-09-24 13:20:43 -07:00
Evgenii Stepanov
4edbcee2c6 Random HWASan cleanups.
Makes CtsBionicTestCases pass under HWASan.

Bug: 193568145
Test: CtsBionicTestCases
Change-Id: I38ee8a8508827c0ffee61ce33bb8c6a3f40388c9
2021-09-24 11:21:38 -07:00
Christopher Ferris
885025eec9 Merge "Update allocator alignment tests." am: 258642b7d7 am: 3e3ada4ff3 am: ae7745f309
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1832879

Change-Id: I685d691ec2f60d15b73cf14b8e2a460b2009eb2f
2021-09-22 01:31:47 +00:00
Christopher Ferris
ae7745f309 Merge "Update allocator alignment tests." am: 258642b7d7 am: 3e3ada4ff3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1832879

Change-Id: Ideb189faf22f38bbe0be7721caaed3360ef00561
2021-09-22 01:16:01 +00:00
Christopher Ferris
3e3ada4ff3 Merge "Update allocator alignment tests." am: 258642b7d7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1832879

Change-Id: I45d13def0ccd2389647972f58dcc34b170698842
2021-09-22 01:03:26 +00:00
Christopher Ferris
258642b7d7 Merge "Update allocator alignment tests." 2021-09-22 00:47:17 +00:00
Christopher Ferris
b3cac0fab4 Update allocator alignment tests.
clang was configured to force 16 byte alignments on allocations > 8
for 64 bit. Unfortunately, we never updated our alignment test to
verify this behavior. So this finally adds these new restrictions.

In addition, when GWP-ASan is enabled, it will take over allocations
from the native allocator. In order to make sure that GWP-ASan also
obeys these alignment checks, add a test that forces GWP-ASan on and
runs the alignment check test.

Test: Ran unit tests on a flame using scudo (both 32 bit and 64 bit).
Test: Ran unit tests on a flame using jemalloc (both 32 bit and 64 bit).
Change-Id: I87a20b9c2f32b9d207f36437d291ed44247dcbd1
2021-09-21 16:09:22 -07:00
Christopher Ferris
8ebc26d871 Merge "Fix broken return code of M_INITIALIZE_GWP_ASAN." am: b47aa42a11 am: 10878a22ca am: a588c14e26
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1831562

Change-Id: Idb6525e4bf4541c1a897daf15a617fd9abb563e6
2021-09-21 18:14:15 +00:00
Christopher Ferris
a588c14e26 Merge "Fix broken return code of M_INITIALIZE_GWP_ASAN." am: b47aa42a11 am: 10878a22ca
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1831562

Change-Id: I056bc2722172241d8d8f6509e68c399a2e90870a
2021-09-21 17:56:58 +00:00
Christopher Ferris
10878a22ca Merge "Fix broken return code of M_INITIALIZE_GWP_ASAN." am: b47aa42a11
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1831562

Change-Id: I0e7bc8e3c1ead0ea4547f342ebb95de4173be08c
2021-09-21 17:42:15 +00:00
Christopher Ferris
b47aa42a11 Merge "Fix broken return code of M_INITIALIZE_GWP_ASAN." 2021-09-21 17:30:59 +00:00
Christopher Ferris
8f9713e237 Fix broken return code of M_INITIALIZE_GWP_ASAN.
When calling android_mallopt using M_INITIALIZE_GWP_ASAN, nothing
was being returned. Fix this, add a test, and also refactor the
code a bit so dynamic and static share the same code.

Test: Unit tests pass in dynamic and static versions.
Test: Passed using both jemalloc and scudo.
Change-Id: Ibe54b6ccabdbd44d2378892e793df393978bc02b
2021-09-20 18:07:07 -07:00
Treehugger Robot
d036625460 Merge "Use the BSD license for our bogus fts.h." am: e8121199fd am: 9ed43777fe am: d5476e0348
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1826812

Change-Id: Ib4f723ba2205cf3be7717f65ad0768e5cd34c691
2021-09-14 23:49:44 +00:00
Treehugger Robot
d5476e0348 Merge "Use the BSD license for our bogus fts.h." am: e8121199fd am: 9ed43777fe
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1826812

Change-Id: I003c06fb1219aee51bf5c02e3df4d8e1f745fd30
2021-09-14 23:33:54 +00:00
Treehugger Robot
9ed43777fe Merge "Use the BSD license for our bogus fts.h." am: e8121199fd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1826812

Change-Id: Ib06ae198d46177c27bca7827855e66e2101150af
2021-09-14 22:32:33 +00:00
Treehugger Robot
e8121199fd Merge "Use the BSD license for our bogus fts.h." 2021-09-14 22:11:31 +00:00
Elliott Hughes
c7fe26aa82 Use the BSD license for our bogus fts.h.
...since the implementation is BSD. I missed this in the original code
review (and the presubmit hooks were skipped, so the machines didn't
notice).

Test: N/A
Change-Id: Ia9fe067c68b3ab8045d3f5dfe256f3200f102fbf
2021-09-14 12:26:08 -07:00
Elliott Hughes
f1043c4b24 Merge "Use lp64 rather than explicitly saying "arm64,x86_64"." am: dc448a82b1 am: 5356f2de42 am: 2288ede403
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819299

Change-Id: I9eabdad28762272320c26d2b3ec57647b18fbe4b
2021-09-10 21:54:21 +00:00
Elliott Hughes
2288ede403 Merge "Use lp64 rather than explicitly saying "arm64,x86_64"." am: dc448a82b1 am: 5356f2de42
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819299

Change-Id: I074e9818b3929875e167c1779260c8ece731b888
2021-09-10 21:39:12 +00:00
Elliott Hughes
5356f2de42 Merge "Use lp64 rather than explicitly saying "arm64,x86_64"." am: dc448a82b1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819299

Change-Id: I4f8b81ba63cd9b5284d18ec026a1b69cfa260872
2021-09-10 21:24:01 +00:00
Elliott Hughes
dc448a82b1 Merge "Use lp64 rather than explicitly saying "arm64,x86_64"." 2021-09-10 21:12:43 +00:00
Treehugger Robot
16bebb0482 Merge changes Ifac9a59e,I213d423a am: 406589b975 am: d87aa4117b am: d0fa82378a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819303

Change-Id: I10a735b4e480b23b4111cb380b310ec1f5f1edfc
2021-09-09 04:58:32 +00:00
Treehugger Robot
d0fa82378a Merge changes Ifac9a59e,I213d423a am: 406589b975 am: d87aa4117b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819303

Change-Id: Iebc1ee0abdcd214266980cdaee278112826601e8
2021-09-09 04:43:43 +00:00
Treehugger Robot
d87aa4117b Merge changes Ifac9a59e,I213d423a am: 406589b975
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819303

Change-Id: Iae2b9bb2b8b65df0bb4695d09ed4d64a790fd3d0
2021-09-09 04:28:56 +00:00
Treehugger Robot
406589b975 Merge changes Ifac9a59e,I213d423a
* changes:
  Export fts as a static library for use with musl
  Compile fts.c in libc_openbsd_ndk
2021-09-09 04:15:12 +00:00
Treehugger Robot
a2023096e6 Merge "Add API level define for T." am: 41fed4d461 am: a64e82b278 am: e5b006be10
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1822489

Change-Id: I8d7d9dffe46e1a7d08d8b6ff687aec268fc66b50
2021-09-09 01:23:54 +00:00
Treehugger Robot
e5b006be10 Merge "Add API level define for T." am: 41fed4d461 am: a64e82b278
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1822489

Change-Id: Icc12d44184e1e589fca31e99b38782fc8299eeda
2021-09-09 01:08:45 +00:00