Commit graph

38864 commits

Author SHA1 Message Date
Treehugger Robot
1c05dd7170 Merge "time.mktime_EOVERFLOW: set an explicit timezone." am: c044d3afeb
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2597441

Change-Id: Ia21cd825a1236424096223980d75da8ba82c438d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-20 01:59:08 +00:00
Treehugger Robot
c044d3afeb Merge "time.mktime_EOVERFLOW: set an explicit timezone." 2023-05-20 01:35:47 +00:00
Ryan Prichard
a6a1edd4d9 Merge "Fixes for versioner guard generation" am: e98bf160eb
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2595561

Change-Id: Idd4cfb39b56140d35b51cb8285f6b14ff0dc92cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 23:10:47 +00:00
Elliott Hughes
f52b2165cb time.mktime_EOVERFLOW: set an explicit timezone.
Bug: http://b/283397453
Test: export TZ=Asia/Shanghai
Change-Id: Ia03822adad367abf35a0fdf55d7367cd1764fcdd
2023-05-19 16:09:47 -07:00
Ryan Prichard
e98bf160eb Merge "Fixes for versioner guard generation" 2023-05-19 22:25:44 +00:00
Elliott Hughes
9c24db8b49 Merge "Fix the types in the arm64 dynamic function dispatch." am: 01db121db5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2595603

Change-Id: I545613907940ffce6beb17df8f56613655861564
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 14:52:28 +00:00
Elliott Hughes
01db121db5 Merge "Fix the types in the arm64 dynamic function dispatch." 2023-05-19 14:15:53 +00:00
Ryan Prichard
4690f0756d Fixes for versioner guard generation
* When calculating the required guard, if a per-arch `introduced`
   value is less than the arch min-API, drop the per-arch guard (i.e.
   reset the value to 0). This is needed for RISC-V, where we don't
   parse the headers with Clang, because the highest APIs we compile
   for (e.g. 23, 34) are less than the current RISC-V min API of 10000.
   Resetting it to 0 here means we don't need this optimization while
   generating an arch-set guard. (i.e. We don't need to calculate
   max_min_version. That code should have been calculating a
   "min_min_version" anyway.)

 * Remove the broken all-supported-archs entry from arch_sets. It has a
   few problems:
    * It's redundant with the "global availability" code path above,
      which is used when the declaration has no per-arch annotations.
    * If this code path runs, then we generate two more guard
      expressions, for !LP64 and LP64.
    * Passing "" to generate_guard is broken for a non-zero version,
      and for a zero version, adding an empty string to `expressions`
      breaks if the vector has 2 or more expressions.

   (I think consolidating per-arch info, e.g. using a single check for
   __INTRODUCED_IN_32(40) __INTRODUCED_IN_64(40), is a nice idea, but
   it should happen as a natural consequence of removing the
   arch-independent "global availability" info in favor of always
   tracking it per-arch.)

 * Rewrite the arch-set guard generation. Add an optimization so that
   the (__ANDROID_API__ >= N) guard for __INTRODUCED_IN_64(N) is still
   useful for RISC-V as long as N is small enough. (Currently we're
   checking that N is <= 10000.)

This change fixes the "preprocessor" test that run_tests.py runs. The
"slow_preprocessor_idempotence" test is still broken.

Bug: https://github.com/android/ndk/issues/1888
Test: run_tests.py
Change-Id: I3f94357465dbdb2c23fff442a31fb5083de27a97
2023-05-18 21:11:43 -07:00
Zijun Zhao
ebd33d5977 Merge "Nullability check for mman module." am: b72900c5c9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2580311

Change-Id: I9de3a0e0689e51725ca755066c7ff2faa09edd54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 00:20:38 +00:00
Zijun Zhao
b72900c5c9 Merge "Nullability check for mman module." 2023-05-18 23:46:06 +00:00
Elliott Hughes
a1974064ae Fix the types in the arm64 dynamic function dispatch.
No actually effect on the code, but misleading and wrong.

Test: treehugger
Change-Id: I55405ac224b4dcc2ae515954aed179c1cde3c73c
2023-05-18 13:40:12 -07:00
Treehugger Robot
17b5bb88c1 Merge "Clarify the defines documentation further." am: 1441748956
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2595593

Change-Id: I63a08af3dc8e9e8f6a63706cbae36ba2a72d3212
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 20:05:32 +00:00
Treehugger Robot
4eccad6838 Merge "Nullability check for system_properties module." am: 83f9b28792
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2593054

Change-Id: I7da1dec1bcb6b83c9c2629118a38387f91ee6ef0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 20:05:22 +00:00
Christopher Ferris
e75e9c0c30 Merge "Use AndroidLocalUnwinder object." am: 3cf1f484b1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2595730

Change-Id: I30dcb96c50293ab3b07fbc42d9579f88af428c06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 20:05:12 +00:00
Treehugger Robot
1441748956 Merge "Clarify the defines documentation further." 2023-05-18 20:03:56 +00:00
zijunzhao
2572571786 Nullability check for mman module.
Bugs: b/245972273
Test: adb shell
Change-Id: Ib5c4887d89581eaedcf4a3e128811a6a374a8d1b
2023-05-18 19:02:25 +00:00
Treehugger Robot
83f9b28792 Merge "Nullability check for system_properties module." 2023-05-18 18:38:17 +00:00
Christopher Ferris
3cf1f484b1 Merge "Use AndroidLocalUnwinder object." 2023-05-18 18:24:58 +00:00
Elliott Hughes
2b9ae05bee Clarify the defines documentation further.
At least one person wasn't entirely convinced by our existing riscv64
documentation, and there was an error in the 32 vs 64 section.

Test: N/A
Change-Id: Iaa08b8f4b5a5506a4ade15f81e17325185036a07
2023-05-18 17:10:37 +00:00
Florian Mayer
ba681ceaec Merge "Revert "Add debug logging for memtag level"" am: e20c5fa4ac
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2595472

Change-Id: Id8460a9fac9527445a2e06e0e665fb6247662703
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 01:53:05 +00:00
Christopher Ferris
e2f58a3f03 Use AndroidLocalUnwinder object.
Using the AndroidLocalUnwinder object allows unwinding interpreter
and JIT'd frames by default. In addition, it simplifies the code.

Test: Forced interpreter on all of the time and forced fdtrack on
Test: and verified unwind includes dex frames.
Test: Forced JIT on all of the time and forced fdtrack on
Test: and verified unwind includes dex frames.
Test: Unit tests pass.
Change-Id: Icae17e83c9aaa04750b07471243550a7829524f7
2023-05-17 18:45:25 -07:00
Florian Mayer
e20c5fa4ac Merge "Revert "Add debug logging for memtag level"" 2023-05-18 01:06:23 +00:00
Florian Mayer
dd44378da7 Revert "Add debug logging for memtag level"
This reverts commit b3f3e86878.

Reason for revert: This created spam in tombstones.

Change-Id: Ia7b8285a6abd6f89d49859a981be1c9cfa104f81
2023-05-17 20:59:14 +00:00
zijunzhao
a505b2d37a Nullability check for system_properties module.
Bug: b/245972273
Test: adb shell
Change-Id: I3a55b8107898014fe74fd1a6f442f1ec00e08790
2023-05-17 20:43:51 +00:00
Treehugger Robot
7e6e6d64ee Merge "riscv64: say "x3" rather than "gp" in shadow call stack assembler." am: ad333b6161
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2592806

Change-Id: Iecb8a9afcd273face3901ac5efef3fcc4c3f2a71
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 17:26:20 +00:00
Treehugger Robot
ad333b6161 Merge "riscv64: say "x3" rather than "gp" in shadow call stack assembler." 2023-05-17 16:51:16 +00:00
Elliott Hughes
c35a0dc08e riscv64: say "x3" rather than "gp" in shadow call stack assembler.
Neither is great, but "gp" seems actively misleading (and setjmp.S
says x3 every time, so we should be consistent if nothing else).

Bug: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/379
Test: treehugger
Change-Id: Ibccda74d4794caa770b82e7ba2e31ce7b645b83f
2023-05-16 16:09:30 -07:00
Treehugger Robot
68364d0074 Merge "Nullability check for time module." am: b167b90b4c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2580375

Change-Id: Ifb3f7c83e53ffb5c7008d14d0256368fe5c3a469
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 19:05:28 +00:00
Treehugger Robot
b167b90b4c Merge "Nullability check for time module." 2023-05-16 18:28:57 +00:00
zijunzhao
2067ec5967 Nullability check for time module.
Bug: b/245972273
Test: adb shell
Change-Id: I61f69f48f3428ef1f544dd01e573ff078a9eab17
2023-05-16 00:17:36 +00:00
Elliott Hughes
94b2422a5b Merge "riscv64: don't use jalr when we can just say call." am: d93f594d78
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2587307

Change-Id: Ia9208b610b6edd0d452b1ce7e124647431f8fc22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 23:18:27 +00:00
Elliott Hughes
d93f594d78 Merge "riscv64: don't use jalr when we can just say call." 2023-05-12 22:45:19 +00:00
Elliott Hughes
3ef0a47b71 Merge "printf unification: floating point." am: a198c71752
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2583717

Change-Id: Iea67828c78b76749c5c94ae27642b63c89f09bf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 21:10:56 +00:00
Elliott Hughes
a198c71752 Merge "printf unification: floating point." 2023-05-12 20:15:02 +00:00
Elliott Hughes
1bfe534274 riscv64: don't use jalr when we can just say call.
We don't actually care about the length of this jump, and lld will relax
it to a jal when possible anyway. Better to have people copy & paste
call and tail than jal and j.

Test: treehugger
Change-Id: I889044b95fbb5567189a0d6ef31f81df0e0383cd
2023-05-12 12:56:54 -07:00
Shreshta Manu
61bc7f1888 Merge "Revert "Nullability check for inet module."" am: 56dba096a2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2587030

Change-Id: I6ce463a2b04dc86b65240a598376f79e8a155eb9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 19:03:03 +00:00
Shreshta Manu
56dba096a2 Merge "Revert "Nullability check for inet module."" 2023-05-12 18:20:56 +00:00
Zijun Zhao
07a2b29dd6 Revert "Nullability check for inet module."
This reverts commit 53dbd78ae0.

Reason for revert: Break build https://android-build.googleplex.com/builds/submitted/10125312/test_suites_x86_64_coverage/latest/view/logs/build_error.log?legacy

Change-Id: Ifccf22768b916d85263abb89b2b4223ae2ce5d80
2023-05-12 18:18:29 +00:00
Zijun Zhao
e2b22857d7 Merge "Nullability check for inet module." am: 50d729b228
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2586047

Change-Id: I596d76aabdd2670765a57ff0ccb66714f8f65068
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 17:59:19 +00:00
Zijun Zhao
add41fd0b0 Merge "Nullability check for if module." am: 8e5e8ee14b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2582943

Change-Id: Iee85c14222e7fc81c9f43d25eac114bf0636ac0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 17:58:53 +00:00
Zijun Zhao
50d729b228 Merge "Nullability check for inet module." 2023-05-12 17:17:48 +00:00
Zijun Zhao
8e5e8ee14b Merge "Nullability check for if module." 2023-05-12 17:17:23 +00:00
Zijun Zhao
8995d7c704 Merge "Nullability check for netdb module" am: 78b0558976
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2522835

Change-Id: I3646c6512d4a12faa08e00f511cbfe9eb64df1ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 01:00:47 +00:00
Zijun Zhao
78b0558976 Merge "Nullability check for netdb module" 2023-05-12 00:21:24 +00:00
Elliott Hughes
531199c56c printf unification: floating point.
The only remaining differences between vfprintf.cpp and vfwprintf.cpp
after this are the wide/narrow conversions for %c, %m, and %s. I've used
"chars" and "bytes" for the named constants for the directions because
(a) I find -1 and 1 pretty confusing and (b) although "narrow" is the
obvious opposite of "wide", only Windows actually moved to wide
characters, so "narrow" (aka "multibyte", and probably "utf8") is the
default/normal case. Even though C confuses bytes and characters via its
`char` type, "bytes" versus "chars" seems like the appropriate
terminology (and it's what Java/Python use).

Also improve the swprintf tests assertion so failures are readable.

Test: treehugger
Change-Id: Ife8f70f65ec28d96058a7d68df353945524835d2
2023-05-11 16:51:13 -07:00
zijunzhao
53dbd78ae0 Nullability check for inet module.
Bugs: b/245972273
Test: adb shell
Change-Id: I51830ddbf5ceb7c02154bd335feb65ca1a230b66
2023-05-11 22:57:27 +00:00
zijunzhao
c741aea751 Nullability check for netdb module
Bugs: b/245972273
Test: adb shell
Change-Id: Id9b4338ca2f0fb64033c221f3bfb269ab930b79b
2023-05-11 21:31:42 +00:00
Elliott Hughes
5f7fdb6774 Merge "riscv64: fix return value when errorno is 4095" am: 0824e2cb84
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2586065

Change-Id: Id883b6196d4da899568ad4d3d5f8cc41bddb66f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 18:44:55 +00:00
Elliott Hughes
0824e2cb84 Merge "riscv64: fix return value when errorno is 4095" 2023-05-11 17:58:00 +00:00
zijunzhao
87aae5309b Nullability check for if module.
Bugs: b/245972273
Test: adb shell
Change-Id: If6be7027e0ebdcf68ae4062c57e1c4e82a767abe
2023-05-11 17:15:57 +00:00