Commit graph

174 commits

Author SHA1 Message Date
Elliott Hughes
7617af2274 Merge "Improve android_set_abort_message() documentation." into main am: dcfc4a1ccc
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2975871

Change-Id: I11be30ab4fa04875304fbfb74b88edf819613c85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-26 21:40:04 +00:00
Elliott Hughes
94c93d659b Improve android_set_abort_message() documentation.
Change-Id: Iee01fcfc39356f3daeb0676acc0dc0dd17675e68
2024-02-23 17:41:55 +00:00
Treehugger Robot
de24241803 Merge "Mention ApplicationExitInfo in docs" into main am: 6835b71819
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2974831

Change-Id: Ib3abeeaa14f06650721fac0504ca23431fad2c42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-23 05:29:51 +00:00
Florian Mayer
63df50e101 Mention ApplicationExitInfo in docs
Bug: 155462331
Change-Id: I2a60dc1ca5a117bd47631dc7faba8446b4518761
2024-02-23 01:34:22 +00:00
Treehugger Robot
2f8ccc57a1 Merge changes from topics "crashapi2", "crashapi3" into main am: 30c7aad06d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2961904

Change-Id: I36d33a95fbd92f2fee23c4f50061e1b7e0aadabc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-21 08:30:41 +00:00
Florian Mayer
4bd5112e33 Allow to re-use the same crash_detail. am: e2aefc46e7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962622

Change-Id: I5f886e0a3f609f06f0679a6d71103a83841a64e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-21 08:30:35 +00:00
Florian Mayer
ca4749af30 header and android_crash_detail prefix for crash_detail API
Bug: 155462331
Change-Id: Ib1c0ac76d2bd036a6b802b0997d9de8be61dfd2b
2024-02-20 23:41:38 +00:00
Florian Mayer
ff5de237b4 Merge "Add API to allow apps to attach extra information to tombstones." into main am: 50f4d83960
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2955867

Change-Id: I7c8fa3892054dc4c069583c5bce8bbc674c61ab5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 17:40:42 +00:00
Florian Mayer
e2aefc46e7 Allow to re-use the same crash_detail.
This is for advanced use-cases that have high performance demands and
know they will repeatedly re-use the crash_detail.

Bug: 155462331
Change-Id: Ib15dac70d1d598f78b74b539aeadf88b0ca32bc7
2024-02-13 13:44:32 -08:00
Florian Mayer
7c83d09679 Add API to allow apps to attach extra information to tombstones.
Test: atest debuggerd_test
Bug: 155462331
Bug: 309446525
Change-Id: Idc8387307738957dbba3daaae59f605566329f0f
2024-02-13 13:41:12 -08:00
Treehugger Robot
0962881106 Merge "s/master/main/" into main am: a01b292ab9 am: f461a3878c am: 3852cfe4cb am: 3b3e2e9d46 am: 381d04c046
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2773870

Change-Id: If6c55eb8331d792fdb9836bc5cb32f220ed860a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 21:12:57 +00:00
Elliott Hughes
9c06d16ca3 s/master/main/
Test: treehugger
Change-Id: I2c975b2f5f92f23c7357b6f7e785578504298cc6
2023-10-04 23:36:48 +00:00
Elliott Hughes
92424f76cb Merge "<termios.h>: add two new POSIX functions." into main am: b130e6dae0 am: f9189bb67d am: 0e87776adc am: 42fd8dbd98 am: 678e06ac31
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2729340

Change-Id: I4289276cf2977a006d1a771e8bec2a74a7902912
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 01:39:55 +00:00
Elliott Hughes
647472db9b <termios.h>: add two new POSIX functions.
musl already added tcgetwinsize() and tcsetwinsize(), but I didn't
notice.

Trivial single-line inlines added to a header that's already written
that way.

Test: treehugger
Change-Id: Iac95ea6a89f3872025c512f7e61987b81d0aafa7
2023-08-29 09:33:04 -07:00
Steven Moreland
4b3d3fa472 Merge "Revert^2 "fdsan android::Parcel"" 2023-06-30 17:02:54 +00:00
Steven Moreland
1d413fce69 Revert^2 "fdsan android::Parcel"
7836677d99

Change-Id: If972bf911fd61286780a7c9800239b83ecddccab
2023-06-22 23:03:57 +00:00
Priyanka Advani
9a97d9e2fa Merge "Revert "fdsan android::Parcel"" 2023-06-22 21:38:46 +00:00
Priyanka Advani
7836677d99 Revert "fdsan android::Parcel"
Revert submission 23699976-fdsan-parcel

Reason for revert: Possible culprit for b/288448299

Reverted changes: /q/submissionid:23699976-fdsan-parcel

Change-Id: I709d2629755b7d014763a7bbd03a65d9f6e7efa7
2023-06-22 21:22:35 +00:00
Steven Moreland
e426ec9421 Merge "fdsan android::Parcel" 2023-06-22 17:09:29 +00:00
Elliott Hughes
655e430b28 Remove the always-true __INTRODUCED_IN() annotations.
The NDK no longer supports API levels earlier than 21.

This *doesn't* include <ctype.h> because I have a separate change
rewriting that (that's blocked on the upcoming libc++ update).

Test: treehugger
Change-Id: I53e915f27011dfc0513e0c78d8799377e183ceca
2023-06-16 12:39:33 -07:00
Steven Moreland
94e2325940 fdsan android::Parcel
Parcel manages ownership of FDs from the binder kernel
in a complicated way. Since sizeof(Parcel) is frozen
in the ABI right now, and we can't allocate more things
on the heap in Parcel, we need to keep on managing
FD ownership manually there.

Ignore-AOSP-First: this requires some fixes only in
  git_master to avoid crashing

Bug: 287093457
Test: boot
Change-Id: I4976507727899f1bb09de41e97f329bee58a4572
2023-06-14 23:36:24 +00:00
Elliott Hughes
421b0ac28c Remove __INTRODUCED_IN_ architecture macros.
No longer used.

Test: treehugger
Change-Id: I90c2565d80fb65ab9bf3100fb85c897c3ed0afc2
2023-06-09 23:34:17 +00:00
zijunzhao
ac6d59cc75 Nullability check for modules in include/android directory
Bugs: b/245972273
Test: adb shell
Change-Id: Ic00d207331d9837a01cf96ec7fe623961e653051
2023-04-12 23:26:46 +00:00
Elliott Hughes
572053a02e Time for SEO in <android/api-level.h>.
So many names/numbers for one release...

Test: treehugger
Change-Id: I00ddb13485c185fc003ea087f1df404bc39fa435
2023-03-23 21:30:15 +00:00
Dan Albert
b3e895c86a Add macro for API level V.
No idea if this will be the actual API level or not, but that's all
the more reason to abstract it away early...

Bug: None
Test: None
Change-Id: I8a17bb42dbb08a6e760427514af8331e7dc9b549
2023-03-23 18:35:16 +00:00
Elliott Hughes
fbd79707c3 Remove <stdlib.h> cruft.
The next NDK to take these headers only supports API 21 and later.

Test: treehugger
Change-Id: Ib5962989c5c978996b04789c21c0822dd8792303
2023-02-24 19:48:50 +00:00
Elliott Hughes
59d90262ed Merge "Remove <fenv.h> inlines for obsolete API levels." 2023-02-24 19:23:24 +00:00
Elliott Hughes
f5e899d84d Merge "Remove <sys/stat.h> inlines for obsolete API levels." 2023-02-24 19:23:15 +00:00
Elliott Hughes
7dfa18a49f Merge "Remove <signal.h> inlines for obsolete API levels." 2023-02-24 19:19:19 +00:00
Elliott Hughes
66734f0c35 Merge "Remove <sys/mman.h> inlines for obsolete API levels." 2023-02-24 19:19:13 +00:00
Elliott Hughes
19ed204031 Remove <sys/mman.h> inlines for obsolete API levels.
The next NDK to take these headers only supports API 21 and later.

Test: treehugger
Change-Id: I64baf933d3796f20dee5c1465ed58f8bb45394b5
2023-02-24 00:41:30 +00:00
Elliott Hughes
acaaab007c Remove <errno.h> inlines for obsolete API levels.
The next NDK to take these headers only supports API 21 and later.

Test: treehugger
Change-Id: Ie9e9bc82612a326d9e608b0d5974231f4acc5638
2023-02-24 00:32:47 +00:00
Elliott Hughes
432a4afb1e Remove <signal.h> inlines for obsolete API levels.
The next NDK to take these headers only supports API 21 and later.

Test: treehugger
Change-Id: I8fe617e6eb781629ddf0b98b0037a9b3e54c559c
2023-02-24 00:28:20 +00:00
Elliott Hughes
2f5829b55d Remove <fenv.h> inlines for obsolete API levels.
The next NDK to take these headers only supports API 21 and later, so
clean up some of the trivial cruft.

Test: treehugger
Change-Id: Ib735a776d244cc82858f2ed629dd63a54dbaf650
2023-02-24 00:16:41 +00:00
Elliott Hughes
3f3a8cd57e Remove <sys/stat.h> inlines for obsolete API levels.
The next NDK to take these headers only supports API 21 and later.

Test: treehugger
Change-Id: Ia2a4c04fdd144cfbe961bdf8d4f53bd4958befe8
2023-02-23 22:53:37 +00:00
Elliott Hughes
6ccb71ca0c Merge "Remove <sys/statvfs.h> inlines for API level 19." 2023-02-23 18:55:04 +00:00
Elliott Hughes
3c3736e1bd Remove <sys/statvfs.h> inlines for API level 19.
API level 19 is no longer supported by the NDK.

While I'm here, let's remove the duplicated structure defintion (as
we've already done for `struct stat`).

Test: treehugger
Change-Id: I9d8286f9e7ba803f3131b6dcb0486ff1b0f9d5d1
2023-02-22 21:58:24 +00:00
Elliott Hughes
d3ebc2f7c4 Merge "Remove <stdlib.h> abs/labs/llabs inline for API level 19." 2023-02-21 21:14:49 +00:00
Elliott Hughes
527d01221e Remove <stdlib.h> abs/labs/llabs inline for API level 19.
API level 19 is no longer supported by the NDK.

Test: treehugger
Change-Id: I9fa1e9b3c492b3d3384e393994a7dddfdb35d805
2023-02-17 23:51:57 +00:00
Elliott Hughes
ed07723a34 Remove <sys/wait.h> wait4() inline for API level 18.
API level 18 is no longer supported by the NDK.

Test: treehugger
Change-Id: I526b628bf3aa9215c9832275f7eeaa15b52a107d
2023-02-17 23:41:55 +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
7b396aee5f Add the other known aliases for the recent Android releases.
Test: treehugger
Change-Id: Ic861cba14236a8e4cd60be340407a8c80cda6c8f
2022-07-15 17:04:50 -07:00
Michael Wright
8cd2ebf80e Add Android U API level to NDK headers
Test: Build
Change-Id: Ic1e0d8b7e5abf07045944d2f610764709b45c923
2022-06-25 00:56:08 +00:00
Ryan Prichard
88134649ee legacy strtof inline: don't set errno for "inf"
Bug: https://github.com/android/ndk/issues/415
Test: libc++'s std/strings/string.conversions/stof.pass.cpp
Change-Id: I2c6bab9e31fb1c916be991f72b04735b5df279c2
2022-04-28 23:17:33 -07:00
Peter Collingbourne
08b968b282 Avoid usage of LONG_BIT in signal headers.
Clang has its own limits.h which is ahead of ours on the inclusion
path. This header uses include_next to include our header, but only
in hosted mode. This means that in freestanding mode we don't get our
limits.h macro definitions, including LONG_BIT. This ends up causing
our signal.h to produce errors when included in freestanding mode on
32-bit platforms.

Fix the errors by replacing usage of LONG_BIT with (8 * sizeof(long))
in the signal headers.

Change-Id: I18ec7b6876d5f862beae09f0c011128eef97c869
2022-03-24 11:11:11 -07:00
Dan Albert
e4106253e7 Fix copy pasta in guard macro for weak symbols.
This was pretty broken. I think anything using this was being given
always-available annotations for everything but 32-bit x86? Treehugger
should complain loudly if this was actually impacting anything though.
I suspect not since the only user of this mode is mainline which
doesn't target far back enough to have arch-specific introduction
guards.

Test: treehugger
Bug: None
Change-Id: I64e96a89d83e64512e661e88915c48a091198992
2022-01-07 16:06:54 -08:00
Dan Albert
e791552fbb Add API level define for T.
Test: treehugger
Bug: None
Change-Id: I7a973bbd7e8d646f45f4d860d564f9f104aab134
2021-09-08 14:57:46 -07:00
Elliott Hughes
a37b18133d Rename __ANDROID_UNGUARDED_AVAILABILITY__ -> __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__.
Also reduce some of the duplication in the macros.

Bug: http://b/179067538
Test: treehugger
Change-Id: I81ab341731b0faad6c7c5f00037feff8576abafb
2021-02-11 12:56:39 -08:00
Dan Albert
eae41f8eeb Fix __VERSIONER_NO_GUARD cases for availability.
libc++ still depends on these being declared even if they are
unavailable. This results in a worse error message (a link error
rather than a compiler diagnostic) if these functions end up being
used, but without the decl headers like libc++'s math.h can't be
included because it refers to an undeclared function.

For the cases where weak symbols aren't being used, don't annotate
these functions with their availability information.

Also need to avoid using __builtin_available for this case because the
NDK doesn't have __isOSVersionAtLeast yet.

__ANDROID_UNGUARDED_AVAILABILITY__ is being used as a proxy for
"building for the NDK" here because we don't have a good signal for
that which works for both the NDK proper and the NDK-in-the-platform
case.

Test: imported into the NDK, built and tested NDK
Bug: None
Change-Id: I9ef3e19a8fa083bca0be47b80dfef7ba52a94866
2021-02-01 12:53:22 -08:00
Jiyong Park
bb19208d66 Guard __libc_current_sigrtmin/max with __builtin_available
The two APIs were added for the API level 21 and beyond. Currently, its
existence is tested using the null check which is done regardless of the
min sdk version of the compilation unit. (which in turn required us to
mark the API symbol weak regardless of the min sdk version.)

Now, we have a better way of testing the API availability;
__builtin_available. The null check is replaced with the call to the
compiler-provided macro which determines if the code is running in a
version of OS where the API is known to exist.

Bug: 150860940
Bug: 134795810
Test: m
Change-Id: Ib96c78f8d3cc71d7e755d1eab86051517bbbcc44
2021-01-15 10:40:51 +09:00