Commit graph

38645 commits

Author SHA1 Message Date
zijunzhao
1e28d06667 Nullability check for socket module.
Bugs: b/245972273
Test: adb shell
Change-Id: I7b6b00705ad7476fabf30727347555eeafff6eda
2023-06-13 21:15:34 +00:00
Treehugger Robot
cf2090b962 Merge "<complex.h>: stop using __INTRODUCED_IN_(32|64)." 2023-06-13 21:05:29 +00:00
Elliott Hughes
826ea44822 Merge "Remove PAGE_SIZE call sites." 2023-06-13 20:36:45 +00:00
Zijun Zhao
0594346633 Merge "Fix iconv_open(3) docs." 2023-06-13 17:20:41 +00:00
Elliott Hughes
7a5d9925b7 Fix iconv_open(3) docs.
Strictly the _doc comment_ is correct, but the names of the parameters
are the wrong way round. (Although iconv_open() follows the usual C
tradition of "destination first", iconv() itself doesn't, so these
functions are inherently confused/confusing.)

Bug: https://github.com/android/ndk/issues/1895
Test: N/A
Change-Id: Iafc9bd630ece1d3c55986b04bb9a99c477716530
2023-06-13 07:38:02 -07:00
Peter Collingbourne
bb11ee6d9c Remove PAGE_SIZE call sites.
To enable experiments with non-4KiB page sizes, introduce
an inline page_size() function that will either return the runtime
page size (if PAGE_SIZE is not 4096) or a constant 4096 (elsewhere).
This should ensure that there are no changes to the generated code on
unaffected platforms.

Test: source build/envsetup.sh
      lunch aosp_cf_arm64_16k_phone-userdebug
      m -j32 installclean
      m -j32
Test: launch_cvd \
  -kernel_path /path/to/out/android14-5.15/dist/Image \
  -initramfs_path /path/to/out/android14-5.15/dist/initramfs.img \
  -userdata_format=ext4
Bug: 277272383
Bug: 230790254
Change-Id: Ic0ed98b67f7c6b845804b90a4e16649f2fc94028
2023-06-12 10:59:39 -07:00
Elliott Hughes
8fc6fcdfab <complex.h>: stop using __INTRODUCED_IN_(32|64).
Although the existing annotations were strictly true (see
https://github.com/android/ndk/issues/1888#issuecomment-1581773348 for
the gory details), given the Play Store requirement that 32-bit code
must have a 64-bit version, it's not obviously useful to offer a
function for 32-bit before 64-bit.

Test: treehugger
Change-Id: I8ca11b874c26dfaa632690f510cb5409d95012e9
2023-06-12 10:22:12 -07:00
Zijun Zhao
71a03774d5 Merge "Nullability check for string modules." 2023-06-12 16:57:00 +00:00
Elliott Hughes
197677cfd9 Merge "Remove __INTRODUCED_IN_ architecture macros." 2023-06-12 13:40:47 +00:00
Treehugger Robot
26add4eae0 Merge "Remove __RENAME_STAT64." 2023-06-10 01:20:11 +00:00
zijunzhao
6d23a08717 Nullability check for string modules.
Bugs: b/245972273
Test: adb shell
Change-Id: I13852702ae87c1ca14ec4f073b5f4b3d42926929
2023-06-10 00:08:50 +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
Elliott Hughes
f242ef6f98 Remove __RENAME_STAT64.
Now API level 21 is our lowest supported API level, __RENAME_STAT64 is
useless.

Test: treehugger
Change-Id: I708b2142b30dfcf6c74e1a14475da690a8c25f59
2023-06-09 15:59:23 -07:00
Treehugger Robot
31849368bb Merge "Nullability check for fcntl module." 2023-06-09 18:38:00 +00:00
Treehugger Robot
6a65763b12 Merge "Nullability check for stdlib module." 2023-06-09 18:37:32 +00:00
Elliott Hughes
87e170df01 Merge "Remove __RENAME_LDBL." 2023-06-09 13:38:40 +00:00
zijunzhao
725c96c005 Nullability check for fcntl module.
Bugs: b/245972273
Test: adb shell
Change-Id: I8a60f54dfc0d3104f848cbb78d05aa0f96cd783a
2023-06-09 00:53:12 +00:00
zijunzhao
f40b4247e8 Nullability check for stdlib module.
Bugs: b/245972273
Test: adb shell
Change-Id: I0033d720b9da633d62b0b047563004e084829388
2023-06-09 00:52:55 +00:00
Treehugger Robot
c16b51dd63 Merge "Implement C23 scanf 'w' length modifiers" 2023-06-08 23:52:30 +00:00
zijunzhao
7890484cae Implement C23 scanf 'w' length modifiers
wN: Specifies that a following b, d, i, o, u, x, or X conversion specifier applies to an integer argument with a specific width where N is a positive decimal integer with no leading zeros (the argument will have been promoted according to the integer promotions, but its value shall be converted to the unpromoted type); or that a following n conversion specifier applies to a pointer to an integer type argument with a width of N bits. All minimum-width integer types (7.22.1.2) and exact-width integer types (7.22.1.1) defined in the header <stdint.h> shall be supported. Other supported values of N are implementation-defined.

Bug: b/271903607
Test: adb shell
Change-Id: I595fd2ac7bc40d9fb7f1935b39933a6cc068eeff
2023-06-08 21:41:26 +00:00
Elliott Hughes
81e8402db3 Merge "Implement rvv version mem* and str* for riscv64" 2023-06-08 20:17:01 +00:00
Treehugger Robot
cb5188d4c8 Merge "Nullability check for poll module." 2023-06-08 02:06:03 +00:00
Treehugger Robot
71985ed110 Merge "Nullability check for threads_inlines module." 2023-06-08 01:11:55 +00:00
zijunzhao
b40e600ba8 Nullability check for poll module.
Bugs: b/245972273
Test: adb shell
Change-Id: Ia44d82bbc0382066ec420f2e7b676f16e1f6d90b
2023-06-07 23:57:12 +00:00
zijunzhao
a8d42a44bb Nullability check for threads_inlines module.
Bugs: b/245972273
Test: adb shell
Change-Id: I4ebf0598527857fc7bfbfc6ed07342af89de57b1
2023-06-07 23:03:46 +00:00
Elliott Hughes
ab2d3e1049 Remove __RENAME_LDBL.
Discussion of this during my recent minor cleanup convinced me that we
should just remove __RENAME_LDBL. There's no obvious benefit to being
able to build something for 32-bit if you can't build the same code for
64-bit, given that most new hardware (and entire verticals such as Auto)
are 64-bit-only, and the Play Store requires any app with 32-bit code to
also ship 64-bit code.

Test: treehugger
Change-Id: I1c5503b968ca66925d7bd125bd3630c41ec1bfd0
2023-06-07 17:20:53 +00:00
Treehugger Robot
063b6bfd65 Merge "Nullability check for stdatomic module." 2023-06-07 15:34:21 +00:00
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
zijunzhao
d909dffcca Nullability check for stdatomic module.
Bugs: b/245972273
Test: adb shell
Change-Id: I8d20606555f88b535259a589517f4c60b65f6761
2023-06-07 00:10:26 +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
Yun Hsiang
40a82d005c Implement rvv version mem* and str* for riscv64
Add vector version mem* and str* functions and only build them when the
vector extension is enabled.
The original implementation comes from
https://github.com/sifive/sifive-libc, which we agree to contribute to
the Android Open Source Project.

Test: mma

Change-Id: I11b671a5bc571d7c783a657f272f282df7d16c29
Signed-off-by: Yun Hsiang <yun.hsiang@sifive.com>
2023-05-31 09:32:42 +08: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