Commit graph

38616 commits

Author SHA1 Message Date
Treehugger Robot
27713a5b02 Merge "Nullability check for termios_inlines module." 2023-06-07 00:10:39 +00:00
Treehugger Robot
4e22f30960 Merge "<math.h>: more use of __RENAME_LDBL." 2023-06-07 00:10:27 +00:00
Treehugger Robot
79600ce16b Merge "<fenv.h>: documentation, and __INTRODUCED_IN removal." 2023-06-06 22:37:59 +00:00
Treehugger Robot
c5774b8945 Merge "Nullability check for unistd module." 2023-06-06 22:36:04 +00:00
Treehugger Robot
fa203f18cc Merge "<sched.h>: __INTRODUCED_IN_ removal." 2023-06-06 22:22:27 +00:00
zijunzhao
9e19785d76 Nullability check for termios_inlines module.
Bugs: b/245972273
Test: adb shell
Change-Id: I0284efc272ed1c3352d4a72deb0760f697b1e877
2023-06-06 21:58:45 +00:00
Treehugger Robot
7ee668977b Merge "Nullability check for stdio module." 2023-06-06 21:13:21 +00:00
zijunzhao
30cf6d09d5 Nullability check for unistd module.
Bugs: b/245972273
Test: adb shell
Change-Id: I958166bcea67399638c28d424b5976be29660232
2023-06-06 20:39:07 +00:00
Elliott Hughes
9cf6036048 <fenv.h>: documentation, and __INTRODUCED_IN removal.
Now the NDK doesn't support API levels below 21, we don't actually need
the different arm32 vs x86 annotations. In general we haven't been
removing this historical information because it might be interesting to
someone, and there's no real reason to remove it, but we've had
versioner bugs recently with these more complex cases.

Test: treehugger
Change-Id: I9460109a2648b9d05d7e21e397935293d3fea8eb
2023-06-06 20:32:12 +00:00
zijunzhao
acd090d585 Nullability check for stdio module.
Bugs: b/245972273
Test: adb shell
Change-Id: I3fe777e75f68b06b944830b96d091cf9d973e0db
2023-06-06 18:43:52 +00:00
Treehugger Robot
0428fc1a9c Merge "Nullability check for thread_properties module." 2023-06-06 00:18:33 +00:00
zijunzhao
70586d6a99 Nullability check for thread_properties module.
Bugs: b/245972273
Test: adb shell
Change-Id: I8f2c640d74d73576d81453973d63568472b2676e
2023-06-05 22:07:50 +00:00
Treehugger Robot
41ea538b40 Merge "Fix elftls_dl#dtv_resize with HWASan" 2023-05-30 20:44:01 +00:00
Christopher Ferris
e48d121a3c Merge "Modify argument parser for multiple arguments." 2023-05-27 18:36:25 +00:00
Christopher Ferris
f2d93d604d Modify argument parser for multiple arguments.
Currently, if a test is created like this:

  BIONIC_BENCHMARK_WITH_ARG(BM_bench, "16");

Everything works as expected, a benchmark is created of BM_bench/16.
However, it is not possible to specify a benchmark should be called with
one argument, but iterate over different values. The example:

  BIONIC_BENCHMARK_WITH_ARG(BM_bench, "16 32");

Creates a single benchmark run with two arguments:

  BM_bench/16/32

This change modifies the algorithm to make it possible to create multiple
instances of the benchmark iterating over each argument as a single
argument. After this change, two benchmarks are executed:

  BM_bench/16
  BM_bench/32

To do the previous behavior, use:

  BIONIC_BENCHMARK_WITH_ARG(BM_bench, "16/32");

This will create a single benchmark with two args. This format does
not support spaces in the args, so "16 / 32" is not valid.

Modified the test_small.xml to use the new format.

Test: All unit tests pass.
Change-Id: I6f486e1d4a90580c3dace0581ea65f439911ef5a
2023-05-26 16:07:16 -07:00
Florian Mayer
2df8ae0f4f Fix elftls_dl#dtv_resize with HWASan
Bug: 271343561
Change-Id: I26755aff68e6c9c2f5454dac0229758b57fd1754
2023-05-26 14:11:40 -07:00
Christopher Ferris
185103af60 Merge "Fix benchmark unit tests." 2023-05-26 20:12:13 +00:00
Treehugger Robot
32ce2d5c82 Merge "time.h: add doc comments." 2023-05-26 20:11:05 +00:00
Elliott Hughes
e17ebfd51a <math.h>: more use of __RENAME_LDBL.
Now the NDK doesn't support API levels below 21, we don't actually need
weird x86-specific annotations. In general we haven't been removing
this historical information because it might be interesting to someone,
and there's no real reason to remove it, but we've had versioner bugs
recently with these more complex cases.

Test: treehugger
Change-Id: Ia457bb338ecf55af8e319e411ec3bf48a03f3c03
2023-05-26 13:00:51 -07:00
Elliott Hughes
db36e0829b <sched.h>: __INTRODUCED_IN_ removal.
Now the NDK doesn't support API levels below 21, we don't actually need
the different arm32 vs x86 annotations. In general we haven't been
removing this historical information because it might be interesting to
someone, and there's no real reason to remove it, but we've had
versioner bugs recently with these more complex cases.

Test: treehugger
Change-Id: Id9c9b8ecc01d232becd5dd8741509c104a8b6e19
2023-05-26 12:58:14 -07:00
Elliott Hughes
d192dbecf0 time.h: add doc comments.
C23 adds timegm(), gmtime_r(), and localtime_r(). We should remove the
"non-standard" text for timegm(), and while I'm here, let's just
document everything in this file.

Test: treehugger
Change-Id: Ia44c1bd155c939f694f6f8138b9cb7503519522c
2023-05-26 09:13:41 -07:00
Christopher Ferris
80b551ddc4 Fix benchmark unit tests.
Add benchmark file dependency in tests instead of using hard-coded
path to bionic-benchmarks.

In addition, add a TEST_MAPPING file so the tests run when benchmark files change.

Test: All unit tests pass.
Test: Ran atest bionic-benchmarks-tests.
Change-Id: I95608f5b5e75d9d74930960a2431c9896b621ce8
2023-05-26 01:20:56 -07:00
Treehugger Robot
0d522dedc9 Merge "Nullability check for nameser module." 2023-05-26 00:18:02 +00:00
zijunzhao
c412f654c5 Nullability check for nameser module.
Bugs: b/245972273
Test: adb shell
Change-Id: I96a4616d1a758d0f04af5d7f0fb8a0206f068b6a
2023-05-25 21:47:11 +00:00
Treehugger Robot
2b12a6ed5f Merge "Nullability check for inet module." 2023-05-25 00:58:10 +00:00
zijunzhao
bf627f4292 Nullability check for inet module.
Bugs: b/245972273
Test: adb shell
Change-Id: I5acb1910f25dc025e1c8924ebf8b6801503f5161
2023-05-24 22:02:49 +00:00
Treehugger Robot
0122e010a9 Merge "static_assert is a keyword in C23." 2023-05-24 18:55:59 +00:00
Elliott Hughes
525761fd7d static_assert is a keyword in C23.
Test: treehugger
Change-Id: I4eba529475b6255bef1af558f54c373aad8737d0
2023-05-24 08:48:42 -07:00
Treehugger Robot
374d2f1be0 Merge "Nullability check for shm module." 2023-05-23 22:01:02 +00:00
zijunzhao
969d6c129a Nullability check for shm module.
Bugs: b/245972273
Test: adb shell
Change-Id: I9bdd5727719311d063fa126fc286618e9d24a45b
2023-05-23 19:15:25 +00:00
Elliott Hughes
3285ae5a4d Merge "Fix the *return* types in the arm64 dynamic function dispatch." 2023-05-23 13:46:30 +00:00
Treehugger Robot
0f371ff845 Merge "Nullability check for xattr module." 2023-05-22 20:46:30 +00:00
Elliott Hughes
20f9d67327 Fix the *return* types in the arm64 dynamic function dispatch.
No actual effect on the code, but misleading and wrong. (The previous
change only fixed the argument types; I didn't notice that some of the
return types were wrong too.)

Test: treehugger
Change-Id: I1ee5c48e2652fd8cbf8178d5659e57f79e61898e
2023-05-22 19:28:33 +00:00
zijunzhao
9f6b4caa9e Nullability check for xattr module.
Bugs: b/245972273
Test: adb shell
Change-Id: I0137c86f3fa7e17fb5fe284c7693315b2df1e2db
2023-05-22 18:31:16 +00:00
Treehugger Robot
c044d3afeb Merge "time.mktime_EOVERFLOW: set an explicit timezone." 2023-05-20 01:35: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
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
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
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
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