Commit graph

38184 commits

Author SHA1 Message Date
Treehugger Robot
f0c02bf0c4 Merge "Merge librust_baremetal_defaults into its library" am: c22ef226a3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2373931

Change-Id: Iada31164f693cd8ad78167e0869e48f75e9c6094
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-05 20:33:44 +00:00
Treehugger Robot
c22ef226a3 Merge "Merge librust_baremetal_defaults into its library" 2023-01-05 20:01:06 +00:00
zijunzhao
e620266d1c Nullability check for time module.
Bugs: b/245972273
Test: None
Change-Id: I65adc146f88bbd948f61d2f22bdec344faba09ae
2023-01-05 00:18:18 +00:00
Chih-hung Hsieh
04558a406c Merge "Disable clang-tidy for upstream files." am: 2b76f88282 am: 6b9f5538f3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2374848

Change-Id: Ieee9312465e3a30d5010b7bea77d6796c3cc12d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 02:03:21 +00:00
Treehugger Robot
8072e7f904 Merge "Nullability check for langinfo module." am: 83c6296287 am: b693ee62c8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2351604

Change-Id: I169bebe051bed7c6a1873b821b85b00d90146f7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 02:02:52 +00:00
Chih-hung Hsieh
6b9f5538f3 Merge "Disable clang-tidy for upstream files." am: 2b76f88282
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2374848

Change-Id: I053d42f83edb6c098bb66ec19c10dd8b1648cbbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 01:45:00 +00:00
Treehugger Robot
b693ee62c8 Merge "Nullability check for langinfo module." am: 83c6296287
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2351604

Change-Id: I0979aa20f29d218b79e81bdd233a42ac973ff399
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 01:44:16 +00:00
Chih-hung Hsieh
2b76f88282 Merge "Disable clang-tidy for upstream files." 2023-01-04 01:22:03 +00:00
Treehugger Robot
83c6296287 Merge "Nullability check for langinfo module." 2023-01-04 01:00:37 +00:00
Chih-Hung Hsieh
e343db3f54 Disable clang-tidy for upstream files.
Bug: 264302877
Test: presubmit tests; make tidy-bionic_subset
Change-Id: I278201c62e70898103bf20ce8823106418c8fb05
2023-01-03 15:08:22 -08:00
zijunzhao
f043619125 Nullability check for langinfo module.
Bugs: b/245972273
Test: None
Change-Id: I92df36179d25ec668647f15848e5164eeb5d4d70
2023-01-03 19:52:35 +00:00
Pierre-Clément Tosi
816176ccd6 librust_baremetal: Add strtol
Add strtol (required by libfdt), which only depends on libc functions
the library already provides or requires.

Bug: 232900974
Test: m pvmfw_bin # with aosp/2314779
Change-Id: I460571b64369c6bf45fef213252f305e978c694d
2023-01-03 18:07:26 +00:00
Pierre-Clément Tosi
199a62e39b librust_baremetal: Add memcpy_chk
Add __memcpy_chk (used by BoringSSL) and start documenting the
dependencies that the baremetal environment needs to provide to
successfully link the library.

Bug: 256148034
Bug: 256827715
Test: m pvmfw_bin && atest vmbase_example.integration_test
Change-Id: I0d61f4efc5cc26a95b74870be7cd7eebeeb0bd3a
2023-01-03 18:05:30 +00:00
Pierre-Clément Tosi
3af5799387 Merge librust_baremetal_defaults into its library
Test: m pvmfw_bin
Change-Id: I14e74019fc64865af615d033f508bfb0d71eef2f
2023-01-03 17:57:42 +00:00
huangchaochao
bdc3796a87 linker: Fix memory leak for reserved memory
When loading a dynamic library, reserved memory is successful, but fail in other steps, such as loading segments, which will generate a memory leak. Because the reserved memory is not released in time.

Bug: https://issuetracker.google.com/issues/263713888

Change-Id: I556ee02e37db5259df0b6c7178cd9a076dab9725
Signed-off-by: huangchaochao <huangchaochao@bytedance.com>
2022-12-29 15:48:41 +08:00
Treehugger Robot
74ffd9d888 Merge "Replace __packed with __attribute__((__packed__)) in uapi headers" am: 6f78f756a2 am: 807e685a98
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2360496

Change-Id: I47107e755b1ca0b7cd1d5ee96b568c66fb6dd6bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-17 03:21:00 +00:00
Treehugger Robot
807e685a98 Merge "Replace __packed with __attribute__((__packed__)) in uapi headers" am: 6f78f756a2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2360496

Change-Id: Ie7893cec6a54e40a066284bdf04977fbc95e473f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-17 02:45:08 +00:00
Treehugger Robot
6f78f756a2 Merge "Replace __packed with __attribute__((__packed__)) in uapi headers" 2022-12-17 01:49:22 +00:00
Chih-hung Hsieh
f750ca735b Merge "Disable clang-tidy for malloc_test.cpp" am: dc9ad89dfe am: d6cdb6e2a0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2360983

Change-Id: I78d1b5b9e11b1c371b7f701378197830580d2b6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-16 21:14:55 +00:00
Chih-hung Hsieh
d6cdb6e2a0 Merge "Disable clang-tidy for malloc_test.cpp" am: dc9ad89dfe
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2360983

Change-Id: I56542e26a7d62b59393dbd9768eab9cdd7262ef3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-16 20:40:36 +00:00
Chih-hung Hsieh
dc9ad89dfe Merge "Disable clang-tidy for malloc_test.cpp" 2022-12-16 20:20:51 +00:00
Colin Cross
4ac332279d Replace __packed with __attribute__((__packed__)) in uapi headers
Linux uapi headers use __packed as an abbreviation for
__attribute__((__packed__)).  In the upstream kernel headers this
is defined in linux/compiler_attributes.h, but it is not defined
in the uapi headers.  Bionic defines it in sys/cdefs.h, which will
almost always provide the needed definition, but there are uapi
headers that use __packed and do not include any system headers
that would include sys/cdefs.h.  Musl's sys/cdefs.h does not
define __packed, which leads to linker errors when __packed is
treated as a variable name.

Replace __packed with __attribute__((__packed__)) when importing
uapi headers to break the dependency on sys/cdefs.h.

Test: m USE_HOST_MUSL=true on oriole-userdebug in internal master
Change-Id: I45f80f4e5aec868b80ce8eb9d757a3e08ae3e1a9
2022-12-16 11:51:40 -08:00
Chih-Hung Hsieh
6fae614060 Disable clang-tidy for malloc_test.cpp
Many clang-analyzer-unix.Malloc warnings from this file
are leaks after test failure and we can ignore them.
Clang-tidy cannot compile this file within 90 second
time limit most of the time, which makes maintaining
it free of clang-tidy warnings impractical.

Bug: 259995529
Test: presubmit; make tidy-bionic-tests_subset
Change-Id: I532c761744b0400dec33363a3235f81ac7fbbb30
2022-12-15 19:35:13 -08:00
zijunzhao
1a49058e66 Nullability check for malloc module.
Bugs: b/245972273
Test: None
Change-Id: I33e164c23d5b7d09af003f3d85e02e676b78aa55
2022-12-15 21:47:53 +00:00
Chia-hung Duan
0f9f7b67ad Merge "Add a malloc rss benchmark" am: 7f69ccfa71 am: 92ce23d412
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2220122

Change-Id: I59cea6a5a7b39dc03fb2532b8619c3e140ec1a39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 03:15:27 +00:00
Chia-hung Duan
92ce23d412 Merge "Add a malloc rss benchmark" am: 7f69ccfa71
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2220122

Change-Id: I3e7d5975805b0fa5e6e34cd0733846ca6aab805b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 02:43:43 +00:00
Chia-hung Duan
7f69ccfa71 Merge "Add a malloc rss benchmark" 2022-12-15 02:17:01 +00:00
Treehugger Robot
316bb1a919 Merge "Nullability check for libgen module." am: 65584f3264 am: c4450af5a5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2346730

Change-Id: I4dd488ef1ebb7b481aea56fd6aa18f20116a7ff7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 01:59:52 +00:00
Treehugger Robot
c4450af5a5 Merge "Nullability check for libgen module." am: 65584f3264
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2346730

Change-Id: Id3fd595b0ead0b0c6662875c9d5f4ddf0c1120bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 01:25:59 +00:00
Treehugger Robot
525c66062b Merge "Introduce minimal static libc for baremetal Rust" am: 746ed77a29 am: 4ae3303119
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2337444

Change-Id: I98fdb1ad5c49ae11ff36abc71eb1da19e688dc58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 01:19:55 +00:00
Treehugger Robot
65584f3264 Merge "Nullability check for libgen module." 2022-12-15 01:04:20 +00:00
Treehugger Robot
4ae3303119 Merge "Introduce minimal static libc for baremetal Rust" am: 746ed77a29
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2337444

Change-Id: I6cf7aaca2db04d521908451503e4e90d0b8bcf40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 00:49:24 +00:00
Treehugger Robot
746ed77a29 Merge "Introduce minimal static libc for baremetal Rust" 2022-12-15 00:22:20 +00:00
Chia-hung Duan
a15d5c4f86 Add a malloc rss benchmark
The behavior of this benchmark includes three steps:
1. Use up to 16 MB by allocating blocks with given size in each thread.
2. Release the all blocks in random order.
3. Use up to 1.6 MB by allocating blocks with given size in each thread.

This is used to see how the allocator manages the free blocks and we can
measure the impact of randomization property used by the allocator.

Test: Run malloc-rss-benchmark $NUM_THREADS $ALLOC_SIZE

Change-Id: Ib68562996905839ee4367b1b059714e2325ca03e
2022-12-14 19:33:22 +00:00
Christopher Ferris
ae2029e59b Merge "Update to v6.1 kernel headers." am: 137ecdd059 am: b6c4151ab0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2347235

Change-Id: Ida5a4bda7fb56688584f0c5385e1a8e6473dddf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-14 18:49:52 +00:00
Christopher Ferris
b6c4151ab0 Merge "Update to v6.1 kernel headers." am: 137ecdd059
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2347235

Change-Id: I00b1efe0c56e23783a3946c08ebfdda94979e105
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-14 18:16:19 +00:00
Christopher Ferris
137ecdd059 Merge "Update to v6.1 kernel headers." 2022-12-14 17:44:45 +00:00
Greg Kaiser
afe0dbd043 Merge "Revert "Remove workarounds for the llvm sanitizers."" am: 3d6c94f771 am: d3cbf98797
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2349743

Change-Id: I8ae8f9f18a684c853d7f88d7f0b4b0ab43dfa56f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 20:51:41 +00:00
Greg Kaiser
d3cbf98797 Merge "Revert "Remove workarounds for the llvm sanitizers."" am: 3d6c94f771
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2349743

Change-Id: I87611a3bc983085d89cc0992b08af27a54d071ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 20:17:59 +00:00
Greg Kaiser
3d6c94f771 Merge "Revert "Remove workarounds for the llvm sanitizers."" 2022-12-13 19:34:50 +00:00
Elliott Hughes
4a3ab2f033 Merge "Ignore ART frames in fdtrack traces." am: 1b663bb9f1 am: 05c10c4ed9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2346722

Change-Id: Id01c5a58a2df9d7070c2886d718477f59b1130d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 18:16:46 +00:00
Elliott Hughes
05c10c4ed9 Merge "Ignore ART frames in fdtrack traces." am: 1b663bb9f1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2346722

Change-Id: I4be0c74d463cf98a8df7fda479f3774ed95c2609
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 17:46:02 +00:00
Greg Kaiser
6f02710ad2 Revert "Remove workarounds for the llvm sanitizers."
This reverts commit fa0e022b06.

Reason for revert: Appears to be causing crash_dump crashes in Go and/or 32-bit

Bug: 262391724
Change-Id: I3964aa9d6c7005313e6bf95b7e87d6a2ab08b52d
Test: Local revert on wembley
2022-12-13 17:20:04 +00:00
Elliott Hughes
1b663bb9f1 Merge "Ignore ART frames in fdtrack traces." 2022-12-13 17:04:23 +00:00
Pierre-Clément Tosi
74a1458116 Introduce minimal static libc for baremetal Rust
LLVM/rustc compiling no_std code expects a few libc symbols to be
defined (memcpy, memset, memcmp). Previously, we used the arm64 library
directly; instead, make the dependency arch-agnostic by exporting it
from Bionic, making it easier to add more libc functions (that might not
be implemented by the optimized routines), as necessary.

Test: m pvmfw_bin && atest vmbase_example.integration_test
Change-Id: I1d2cc69a25bbb7eddc67357a028b7b79d4909e79
2022-12-13 14:17:50 +00:00
Ryan Prichard
38b3afe433 Merge changes I7ba9cef9,Ia191be0b,I16ba3dc8 am: d791a6501e am: 4c994d5bb6
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2336140

Change-Id: I863790ba3ea09365579a48782e986673d8d8fa0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 02:04:05 +00:00
Ryan Prichard
4c994d5bb6 Merge changes I7ba9cef9,Ia191be0b,I16ba3dc8 am: d791a6501e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2336140

Change-Id: I53c1dd81aa3f3a4980a33218a5729eb55f5be1ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 01:32:45 +00:00
Ryan Prichard
d791a6501e Merge changes I7ba9cef9,Ia191be0b,I16ba3dc8
* changes:
  Expose unwinder APIs in NDK stubs for R and up.
  Use abi::__cxa_demangle declared in cxxabi.h
  __cxa_atexit_test: declare __cxa_atexit and __cxa_finalize
2022-12-13 00:53:40 +00:00
zijunzhao
ab17c07f1e Nullability check for libgen module.
Bugs: b/245972273
Test: None
Change-Id: I41c741701a5b4416a09c3c683a0817b219262c6d
2022-12-13 00:06:09 +00:00
Elliott Hughes
3d58d93cab Merge "Remove workarounds for the llvm sanitizers." am: 62d8f1a41a am: 37b5b4c498
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2324304

Change-Id: I57308fb8d11be4ef7d447b4851b3b52a5d01fbff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-12 23:43:46 +00:00