Commit graph

11026 commits

Author SHA1 Message Date
Zijun Zhao
e718f8b912 Merge "Nullability check for mntent module" 2023-03-13 18:02:39 +00:00
Treehugger Robot
0a9fd0e77e Merge "Nullability check for signalfd module" 2023-03-13 17:38:38 +00:00
zijunzhao
424cb2cbfd Nullability check for mntent module
Bugs: b/245972273
Test: adb shell
Change-Id: I8cbf1960c162c1def670b016663fbf10c2f8cb93
2023-03-11 01:52:28 +00:00
zijunzhao
98f116b319 Nullability check for signalfd module
Bugs: b/245972273
Test: adb shell
Change-Id: I47efddc9c0e217fcb29b3f4f1e2d30f27b23c05f
2023-03-11 01:51:02 +00:00
Treehugger Robot
1cccc1a059 Merge "Nullability check for resolv module" 2023-03-11 01:26:13 +00:00
zijunzhao
e589574d22 Nullability check for thread module
Bugs: b/245972273
Test: adb shell
Change-Id: Id93d0456e063adf0d41483a1f99f66c2d67bd4df
2023-03-10 20:37:27 +00:00
zijunzhao
16c23883bd Nullability check for resolv module
Bugs: b/245972273
Test: adb shell
Change-Id: I3ee948b3c832ece1969453d499e6f5de5d0bd85e
2023-03-10 01:40:04 +00:00
Elliott Hughes
d2e55dd05b Merge "The syscall call uses the 'tail' instruction call" 2023-03-09 22:03:42 +00:00
caowencheng
c42c74138c The syscall call uses the 'tail' instruction call
If the 'j' command is used here,it cannot always be called.
The 'tail' command is used here, let the compiler decide
which instruction to use,when the call distance is less
than 1M, it will be compiled into 'j' command, and when
the distance is greater than 1M, it will be compiled
into 'aupic' and 'jr' command.

Test: llvm-objdump -d
Change-Id: I53d8aa7f54b9c4c96fce491487dcba7b63348219
Signed-off-by: caowencheng <caowencheng@eswincomputing.com>
2023-03-09 07:44:03 +00:00
Zijun Zhao
7f8133dc2f Merge "Nullability check for pidfd module" 2023-03-09 00:06:12 +00:00
Zijun Zhao
85fc6b141e Merge "Nullability check for utsname module" 2023-03-08 23:47:42 +00:00
Zijun Zhao
5bfbc5330f Merge "Nullability check for assert module" 2023-03-08 23:47:30 +00:00
Elliott Hughes
6cb7db2b03 Merge "riscv64: use tail for tail calls." 2023-03-08 21:13:37 +00:00
zijunzhao
edc554dace Nullability check for pidfd module
Bugs: b/245972273
Test: adb shell
Change-Id: I825cd4091f6e9d052a332e91c8b2455dd5c71b01
2023-03-08 21:06:57 +00:00
zijunzhao
f6f0c9dd1b Nullability check for utsname module
Bugs: b/245972273
Test: adb shell
Change-Id: I713c54998ab32e3dc9a6d53fd64523f5fdcbf79a
2023-03-08 21:05:19 +00:00
zijunzhao
698b6160a3 Nullability check for assert module
Bugs: b/245972273
Test: adb shell
Change-Id: Ic682d7bfd1dab53a776bcd783fbff9df07e309f5
2023-03-08 21:02:48 +00:00
Elliott Hughes
b0d3f0bcef riscv64: use tail for tail calls.
Don't assume that a `j` will always be in range. Let the toolchain
come up with the shortest sequence that will actually work.

Test: llvm-objdump -d
Change-Id: I497a68ecae434aad173c2b1c8024aed3756b8440
2023-03-08 18:22:29 +00:00
Treehugger Robot
a7015eaa64 Merge "Fix the compile errors "R_RISCV_JAL out of rang" when the jump range is greater than 1M memory space between vfork and __set_errno_internal" 2023-03-08 18:19:19 +00:00
Treehugger Robot
7f2f9410ab Merge "Nullability check for grp module" 2023-03-08 06:26:15 +00:00
Zijun Zhao
2c445d9979 Merge "Nullability check for stdio module" 2023-03-08 05:16:57 +00:00
caowencheng
d27c83fbd4 Fix the compile errors "R_RISCV_JAL out of rang" when the jump range is greater than 1M memory space between vfork and __set_errno_internal
the "tail" command is used here, let the compiler decide
which instruction to use. when the call distance is less
than 1M, it will be compiled into "jr" command, and when
the distance is greater than 1M, it will be compiled
into "aupic" and "jr" command.

Test: make libc
Change-Id: I80d099d25c7cc2439a297d8afc65abeb5a7a360c
Signed-off-by: caowencheng <caowencheng@eswincomputing.com>
2023-03-08 01:44:50 +00:00
Alistair Delva
78f71a53e5 Merge "Guard registers definitions for riscv64" 2023-03-08 00:55:11 +00:00
zijunzhao
33102fb381 Nullability check for grp module
Bugs: b/245972273
Test: adb shell
Change-Id: Ic45b8ff095f5e388389078b63ac2cd5e745422cf
2023-03-08 00:15:01 +00:00
Nelly Vouzoukidou
1cb31580f8 Guard registers definitions for riscv64
Guarding the definitions of registers with `#if definded(__USE_GNU)`.
This resolves a name conflict with the mesa3d library when
Virgl is enabled.

Test: launch_cvd -console=true -guest_enforce_security=false\
                 --gpu_mode=drm_virgl
Change-Id: I4402500eff74e26343700c099dd397b8a19a5ee3
2023-03-07 17:03:41 +00:00
Elliott Hughes
75a114b0b1 Merge "Sync with upstream openbsd." 2023-03-07 16:48:06 +00:00
Elliott Hughes
056ce2eb34 Merge "Add the %b/%B PRI* and SCN* macros." 2023-03-07 16:21:44 +00:00
zijunzhao
00a3dbaab6 Nullability check for stdio module
Bugs: b/245972273
Test: adb shell
Change-Id: I6d1f2afad6ab3f884795a2d33875684a14fe54d6
2023-03-07 01:07:19 +00:00
Elliott Hughes
53b6dfbc64 Sync with upstream openbsd.
Upstream made a change similar to our %s change, so we don't need that
difference any more. (But they didn't seem interested in our GNU
extensions, even though they're sensible ones that just ensure symmetry
between strftime() and strptime().)

Bug: http://b/167569813
Test: treehugger
Change-Id: I1d86d69c87b51719f0583341fafa7802869cd37e
2023-03-06 23:32:48 +00:00
Elliott Hughes
ac34ad2ae6 Add the %b/%B PRI* and SCN* macros.
This was a suggested change:

https://open-std.org/JTC1/SC22/WG14/www/docs/n3072.htm#pri-and-scn-macros-are-missing-for-new-format-specifiers

That has been accepted, but at the time of writing, there isn't yet
a new PDF that includes the changes.

Test: treehugger
Change-Id: If7b68d246561716465e937a7d2c7482d2c739ce7
2023-03-06 21:41:54 +00:00
Elliott Hughes
529c16a678 Merge "memset_chk into assembly file" 2023-03-06 20:53:36 +00:00
caowencheng
ab457f9022 memset_chk into assembly file
Writing an assembly file can reduce several
assembly instructions, and compare it through
the disassembly of this file

Test: make libc
Change-Id: Ifdcc9c76742cc95b2ad9e3c14fac4796c36e12e6
Signed-off-by: caowencheng <caowencheng@eswincomputing.com>
2023-03-06 07:23:10 +00:00
Elliott Hughes
ae1c64ac92 Slightly simplify perror().
Using %m is slightly less code, and means that perror() wouldn't touch
the strerror buffer in TLS. Doesn't matter, but noticed while I was
looking at this for another reason, and since it's _less_ code...

Test: treehugger
Change-Id: I99d31a5c326962958ad843ec4da2c3cc3b93b048
2023-03-03 23:46:34 +00:00
Elliott Hughes
8dd531cef9 Merge "Remove #if cruft." 2023-03-02 23:55:45 +00:00
Elliott Hughes
dc3ed4f164 Merge "Pull flockfile/funlockfile/ftrylockfile into stdio.cpp." 2023-03-02 21:24:19 +00:00
Elliott Hughes
20dd3fed7a Pull flockfile/funlockfile/ftrylockfile into stdio.cpp.
These are just one-liners, and the _FLOCK() macro seemed to me more
obscure than just inlining it (especially because there are only four
call sites total, so it's not like anyone's going to see that macro very
often).

Also add the missing CHECK_FP() calls. I don't expect this to break
anything, but if it does we can add a target API level check.

Test: treehugger
Change-Id: Ifa1a39d5d9eee46cca783acbe9ec3b3a1e6283d9
2023-03-02 01:44:54 +00:00
Zijun Zhao
6bda367899 Merge "Nullability check for dlfcn module" 2023-03-02 00:32:47 +00:00
zijunzhao
447c346475 Nullability check for dlfcn module
Bugs: b/245972273
Test: adb shell
Change-Id: I0ecde8a0f1f71b6ec2262ff637d33c518578d54d
2023-03-01 21:29:41 +00:00
Elliott Hughes
5ee6292872 Remove #if cruft.
There's negative value to explicitly calling out Linux and ELF here,
when Android -- and especially this project -- is always both anyway.

No functional change.

Test: treehugger
Change-Id: Ic7514d74a5b5f6f06e64c46486c12773995076cd
2023-03-01 20:26:41 +00:00
zijunzhao
e7d41ab7c0 Nullability check for ifaddrs module
Bugs: b/245972273
Test: adb shell
Change-Id: Iccb419667282922d31e2c81b3d9dbac8b6009a76
2023-03-01 01:36:30 +00:00
Elliott Hughes
93398b1b14 Merge "Remove <pthread.h> cruft." 2023-02-28 16:27:57 +00:00
zijunzhao
6b6d51e9ea Nullability check for stdio_ext module
Bugs: b/245972273
Test: adb shell
Change-Id: I4175218f6fa7f4581a739bb0f12cf10b6bdb529e
2023-02-27 23:34:25 +00:00
Elliott Hughes
9108f258ad Remove <pthread.h> cruft.
The next NDK to take these headers only supports API 21 and later.

Note that this change leaves the _implementation_ of these functions
behind, so that any old apps calling these APIs should continue to work,
you just can't (without declaring the functions yourself) write new ones
that do (and declaring the functions yourself would only work on LP32
anyway, so that's not going to get you very far in 2023).

Test: treehugger
Change-Id: Ie03514e4215b40f6e9feaa6e4bf5df5b16dc8d59
2023-02-27 21:31:11 +00:00
Elliott Hughes
957d34a85c Merge "Remove libandroidsupport cruft." 2023-02-25 02:28:38 +00:00
Elliott Hughes
20cd43a66d Merge "Remove <stdlib.h> cruft." 2023-02-24 23:35:29 +00:00
Zijun Zhao
41a4aa3174 Merge "Nullability check for iconv module" 2023-02-24 23:14:16 +00:00
Zijun Zhao
67737cdf9f Merge "Nullability check for error module" 2023-02-24 23:08:57 +00:00
Zijun Zhao
2b26a1e22c Merge "Nullability check for ftw module" 2023-02-24 20:33:47 +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
zijunzhao
377954fdc6 Nullability check for error module
Bugs: b/245972273
Test: adb shell
Change-Id: I9d1c20cf2a7e1e4201c3c54a321c9d9f896c92e2
2023-02-24 19:44:21 +00:00
Pierre-Clément Tosi
39aed9c58a Merge "librust_baremetal: Add libc_netbsd" 2023-02-24 19:42:45 +00:00