Commit graph

37141 commits

Author SHA1 Message Date
Elliott Hughes
82be76b5a2 Add __freadahead.
At the time I added <stdio_ext.h>, I just added what was on the man
page (which matched glibc), not realizing that musl and glibc had
slightly different functionality in their headers.

The toybox maintainer came up with a legitimate use case for this, for
which there is no portable workaround, so I'm adding it here. I'm not
adding the other functions that are in musl but not glibc for lack of a
motivating use case.

Bug: http://lists.landley.net/htdig.cgi/toybox-landley.net/2022-April/020864.html
Test: treehugger
Change-Id: I073baa86ff0271064d4e2f20a584d38787ead6b0
2022-09-22 23:47:42 +00:00
Elliott Hughes
72f572185f Merge "Update module configs for native tests" 2022-09-16 22:05:55 +00:00
Guang Zhu
82fc2d573c Update module configs for native tests
Use /data/local/tests/unrestricted as on-device test path so that
debuggerd can generate proper back traces.

Bug: 199904562
Bug: 184739644
Test: treehugger
Change-Id: I4ae1fb3182dde081121179f1b099374119205dd3
2022-09-16 20:05:38 +00:00
Florian Mayer
f8d7761525 Merge "Give init visibility into bionic headers." 2022-09-14 01:22:45 +00:00
Florian Mayer
f5d70cef37 Give init visibility into bionic headers.
Change-Id: Ia17a7382c6e3c51dab3694030e55796852d8b411
2022-09-13 13:59:26 -07:00
Christopher Ferris
cac5789bbc Merge "Write record allocs from interrupt handler." 2022-09-13 19:13:45 +00:00
Automerger Merge Worker
f724f00ee3 Merge "Merge "Merge android12L-tests-dev@8941410." into android13-tests-dev am: 2f297f9c39" 2022-09-12 18:29:02 +00:00
Treehugger Robot
10cd54e7f8 Merge "Merge android12L-tests-dev@8941410." into android13-tests-dev am: 2f297f9c39
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2185880

Change-Id: I02c480e0445435a7783af8ee39f8d14c2c801628
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 18:28:36 +00:00
Christopher Ferris
06993a6430 Write record allocs from interrupt handler.
There are many cases where there are no more allocations
when a dump of the record allocs might occur. Move the entries
being written to file in the interrupt handler.

Update the unit tests for this new functionality and add a new
unit test that verifies no allocations occur while the entries
are being written.

Fix the unit tests so that the record allocs files get deleted
properly.

Test: All unit tests pass.
Test: Ran 1000 iterations of unit tests to verify no flakes.
Change-Id: I20941596c1dda5a761522050dc155b06f3f3e735
2022-09-09 12:07:33 -07:00
Treehugger Robot
73306db45e Merge "Declare the headers of the ndk_library" 2022-09-09 01:28:04 +00:00
Florian Mayer
298bcecead Merge "Add android_mallopt to query MTE stack state" 2022-09-09 00:49:08 +00:00
Spandan Das
6feb2ccfe9 Declare the headers of the ndk_library
This creates a dependency edge between the ndk_library and its headers,
which should be a no-op in regular Soong builds. This dependency edge
will be used in the Multi-tree project to export the relevant .h files into a well
known location

Test: m nothing
Bug: 239044713
Change-Id: I3f38edfbb8ce6b47dd4e73de4e1e0ad7a371799c
2022-09-08 23:44:35 +00:00
Christopher Ferris
41d1f94be6 Merge "Fix tests/NOTICE file." 2022-09-08 23:29:35 +00:00
Christopher Ferris
76da7bad0e Fix tests/NOTICE file.
Some previous change did not update the NOTICE file properly.

Test: Uploads.
Change-Id: I9d1797cbb7d0d0485e697e8038497f182e33446c
2022-09-08 21:54:29 +00:00
Florian Mayer
cc61ad895e Add android_mallopt to query MTE stack state
Bug: 244364391
Change-Id: Ie6267201f0c2e293b27c71cd160a2311c9de8091
2022-09-07 23:38:42 +00:00
Treehugger Robot
2526b660fd Merge changes from topics "gwp-asan-headers", "native_handle_fdsan"
* changes:
  Open libasync_safe to any APEX
  Remove gwp_asan_headers from libc_defaults
2022-09-06 22:48:31 +00:00
Brian Duddie
e78ea1fc0c Open libasync_safe to any APEX
Permits usage of fdsan in libcutils.

Bug: 244214188
Test: build
Change-Id: I7ac5248c697853aec1210b16b79a84de9046d0d3
2022-09-02 22:43:56 +00:00
Mitch Phillips
b09a3ca076 Remove gwp_asan_headers from libc_defaults
This turns out to over-export GWP-ASan headers to apexes. This is
unnecessary, GWP-ASan headers should only be referenced by libc
internally and debuggerd.

Test: m
Bug: N/A
Change-Id: I04bb8ceb094e681366a4931185906e67ce420c17
2022-09-02 11:52:20 -07:00
Florian Mayer
44742701c9 Merge "Revert^2 "memtag_stack tests."" 2022-09-01 19:29:33 +00:00
Treehugger Robot
de01d6f0c2 Merge "Fix comment to indicate android_mallopt is also available to APEXes." 2022-09-01 02:25:19 +00:00
Florian Mayer
d71bc4bc3a Fix comment to indicate android_mallopt is also available to APEXes.
Change-Id: Ic8ed578ab3323e6e1a80e05756202354b92fd512
2022-08-31 22:30:04 +00:00
Florian Mayer
c82d7fcd22 Revert^2 "memtag_stack tests."
8162b05ccd

Change-Id: I68c1988b0d76dddfaf69189cfd439192cabda00d
2022-08-31 20:57:03 +00:00
Florian Mayer
376e9b07ca Merge "Revert "memtag_stack tests."" 2022-08-31 18:37:29 +00:00
Florian Mayer
8162b05ccd Revert "memtag_stack tests."
Revert "[soong] Add memtag-stack sanitizer, switch to linker-gen..."

Revert submission 2096883-memtag-stack

Reason for revert: b/244454542
Reverted Changes:
I7fee03d90:memtag_stack tests.
I52d2318c8:[soong] Add memtag-stack sanitizer, switch to link...

Change-Id: I0dac2a6a6757a78c9f831cd7cc463b0e0f6376c6
2022-08-31 18:30:18 +00:00
Florian Mayer
5c6c043820 Merge "memtag_stack tests." 2022-08-31 17:53:43 +00:00
Evgenii Stepanov
d624d2f3d9 memtag_stack tests.
This tests cover stack tagging setup in response to NT_MEMTAG_STACK and
vfork and longjmp support.

Bug: b/174878242
Test: fvp_mini with ToT LLVM
  SANITIZE_TARGET="memtag_heap"
  SANITIZE_TARGET="memtag_heap,memtag_stack"

Change-Id: I7fee03d901092d9428d86a6fab6bef4e2e3b51eb
2022-08-30 18:00:21 +00:00
Treehugger Robot
2f297f9c39 Merge "Merge android12L-tests-dev@8941410." into android13-tests-dev 2022-08-30 02:08:17 +00:00
Treehugger Robot
efe45a1d43 Merge "Add fdsan owner type for native_handle_t" 2022-08-29 21:54:10 +00:00
Brian Duddie
5cfca6b832 Add fdsan owner type for native_handle_t
Bug: 244214188
Test: validated alongside sensor service change
Change-Id: Ia576b551012c50def8a8ebe82115ceac35070dcb
2022-08-29 21:29:45 +00:00
Elliott Hughes
cfc991608c Merge "setjmp.h: add the missing __returns_twice to sigsetjmp()." 2022-08-25 23:30:29 +00:00
Elliott Hughes
963e24b93e setjmp.h: add the missing __returns_twice to sigsetjmp().
setjmp() and _setjmp() were already correct, but we'd missed
sigsetjmp(). Found while investigating a toybox timeout(1) failure on
macOS, which doesn't annotate _any_ of these functions.

Also add all the missing doc comments while I'm here.

Test: treehugger
Change-Id: I69dc2587d140916d172237173c2bd56547a4ed8a
2022-08-25 20:13:00 +00:00
Jiyong Park
c00d06867a Merge "Use liblog_for_runtime_apex instead of liblog" 2022-08-19 16:03:05 +00:00
Jiyong Park
7157dfbfe7 Use liblog_for_runtime_apex instead of liblog
liblog_for_runtime_apex is a static variant of liblog which is
explicitly marked as available to the runtime APEX. Any static
dependency to liblog from inside the runtime APEX is changed from liblog
to liblog_for_runtime_apex.

Previously, to support the need for using liblog inside the runtime
APEX, the entire (i.e. both static and shared variants) liblog module
was marked as available to the runtime APEX, although in reality only
the static variant of the library was needed there. This was not only
looking dirty, but also has caused a problem like b/241259844.

To fix this, liblog is separated into two parts. (1) liblog and (2)
liblog_for_runtime_apex. (1) no longer is available to the runtime APEX
and is intended to be depended on in most cases: either from the
non-updatable platform, or from other APEXes. (2) is a static library
which is explicitly marked as available to the runtime APEX and also
visible to certain modules that are included in the runtime APEX.

Bug: 241259844
Test: m and check that liblog depends on stub library of libc
Change-Id: Ib21f6e64da0c7592341b97b95ca8485d7c29ac4d
2022-08-19 13:09:18 +09:00
Xin Li
75f40e8dcb Merge android12L-tests-dev@8941410.
Change-Id: I5c71068d05f27bff99f1adc17400c0ec709b4dd0
2022-08-17 22:08:00 -07:00
Florian Mayer
af24941d48 Merge "[MTE] Never upgrade MTE mode for zygote." 2022-08-16 16:23:50 +00:00
Florian Mayer
14cbb7963a [MTE] Never upgrade MTE mode for zygote.
Bug: 169277947
Change-Id: I90e9f3d2084b0ef5d035b5ae3e5101e365038f26
2022-08-15 14:34:49 -07:00
Christopher Ferris
df75e05551 Merge "Adjust the calculation method of pc" am: 94d8e02d33
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2145980

Change-Id: Ie15179c4d8d71783e03c13dd31ec5d55d6d494d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-13 01:17:20 +00:00
Christopher Ferris
94d8e02d33 Merge "Adjust the calculation method of pc" 2022-08-13 00:53:05 +00:00
周至捷
4b84644ac1 Adjust the calculation method of pc
offset is required anytime
fix issue:
https://issuetracker.google.com/issues/238368984

Bug: 238569739

Signed-off-by: 周至捷 <zhouzhijie@xiaomi.com>
Change-Id: I0eeb2940235047b8e7980f5c8bce69c6904d4e9d
2022-08-12 22:34:21 +00:00
Treehugger Robot
2e48f897b5 Merge "Exclude BUILD files from musl sysroot globs" am: d3c7700aa0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2184577

Change-Id: Ia7753a900f0477a8a306af3b069d4176caaa78f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 21:37:53 +00:00
Treehugger Robot
d3c7700aa0 Merge "Exclude BUILD files from musl sysroot globs" 2022-08-12 21:14:52 +00:00
Christopher Ferris
915d728a94 Merge "Add the .debug_frame for arm32." am: 52b20bd71c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2184318

Change-Id: I8b6749e1a37efeb1325c6b48d215402decc5a6e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 21:02:32 +00:00
Christopher Ferris
52b20bd71c Merge "Add the .debug_frame for arm32." 2022-08-12 20:31:36 +00:00
Colin Cross
1c0a7a09ff Exclude BUILD files from musl sysroot globs
Don't package the BUILD files into musl sysroots.

Test: build musl sysroot
Change-Id: I260a59a8c0cdd5b4249b657c8435c01fbb56eeb7
2022-08-12 11:49:24 -07:00
Christopher Ferris
d37df2b638 Add the .debug_frame for arm32.
As with libc.so, add the debug frame into the linker for arm32
to make any crashes unwindable.

Bug: 242162222

Test: Forced a crash on wembley where an unwind failed before and
Test: verified it unwinds properly with the debug frame.
Change-Id: I2b904af63f670b038d169f5a7d907637b352ab4e
2022-08-11 17:39:43 -07:00
Elliott Hughes
b8d5a130a6 Merge "Add C23's memset_explicit()." am: f9fac36f15
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2182298

Change-Id: Ib3e755aff50d721d1a86034687415c9ef8196677
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-11 22:09:56 +00:00
Christopher Ferris
6eb1f11001 Merge "Update to v5.19 kernel headers." am: bf75d08b13
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2181976

Change-Id: Iae548634e7f5c00fe821294081ac12a4243dce03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-11 22:09:39 +00:00
Elliott Hughes
f9fac36f15 Merge "Add C23's memset_explicit()." 2022-08-11 22:01:28 +00:00
Christopher Ferris
bf75d08b13 Merge "Update to v5.19 kernel headers." 2022-08-11 21:50:34 +00:00
Elliott Hughes
32188c716e Merge "Add %b and %B support to the scanf/wscanf and strto*/wcsto* families." am: d1c3d4a454
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2175189

Change-Id: I8fef15363132b4dbd2fcc44fab9226c919ee4b58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-11 21:43:00 +00:00