Merge "Nullability check for unistd module." am: c5774b8945
am: ba1a11d9c0
am: 25bfadbc29
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2611292 Change-Id: I68247df234930e61b55f50a630cd108e203c406c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
4af96d3b3f
1 changed files with 22 additions and 22 deletions
|
@ -29,24 +29,24 @@
|
||||||
#error "Never include this file directly; instead, include <unistd.h>"
|
#error "Never include this file directly; instead, include <unistd.h>"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char* __getcwd_chk(char*, size_t, size_t) __INTRODUCED_IN(24);
|
char* _Nullable __getcwd_chk(char* _Nullable, size_t, size_t) __INTRODUCED_IN(24);
|
||||||
|
|
||||||
ssize_t __pread_chk(int, void*, size_t, off_t, size_t) __INTRODUCED_IN(23);
|
ssize_t __pread_chk(int, void* _Nonnull, size_t, off_t, size_t) __INTRODUCED_IN(23);
|
||||||
ssize_t __pread_real(int, void*, size_t, off_t) __RENAME(pread);
|
ssize_t __pread_real(int, void* _Nonnull, size_t, off_t) __RENAME(pread);
|
||||||
|
|
||||||
ssize_t __pread64_chk(int, void*, size_t, off64_t, size_t) __INTRODUCED_IN(23);
|
ssize_t __pread64_chk(int, void* _Nonnull, size_t, off64_t, size_t) __INTRODUCED_IN(23);
|
||||||
ssize_t __pread64_real(int, void*, size_t, off64_t) __RENAME(pread64);
|
ssize_t __pread64_real(int, void* _Nonnull, size_t, off64_t) __RENAME(pread64);
|
||||||
|
|
||||||
ssize_t __pwrite_chk(int, const void*, size_t, off_t, size_t) __INTRODUCED_IN(24);
|
ssize_t __pwrite_chk(int, const void* _Nonnull, size_t, off_t, size_t) __INTRODUCED_IN(24);
|
||||||
ssize_t __pwrite_real(int, const void*, size_t, off_t) __RENAME(pwrite);
|
ssize_t __pwrite_real(int, const void* _Nonnull, size_t, off_t) __RENAME(pwrite);
|
||||||
|
|
||||||
ssize_t __pwrite64_chk(int, const void*, size_t, off64_t, size_t) __INTRODUCED_IN(24);
|
ssize_t __pwrite64_chk(int, const void* _Nonnull, size_t, off64_t, size_t) __INTRODUCED_IN(24);
|
||||||
ssize_t __pwrite64_real(int, const void*, size_t, off64_t) __RENAME(pwrite64);
|
ssize_t __pwrite64_real(int, const void* _Nonnull, size_t, off64_t) __RENAME(pwrite64);
|
||||||
|
|
||||||
ssize_t __read_chk(int, void*, size_t, size_t) __INTRODUCED_IN(21);
|
ssize_t __read_chk(int, void* __BIONIC_COMPLICATED_NULLNESS, size_t, size_t) __INTRODUCED_IN(21);
|
||||||
ssize_t __write_chk(int, const void*, size_t, size_t) __INTRODUCED_IN(24);
|
ssize_t __write_chk(int, const void* __BIONIC_COMPLICATED_NULLNESS, size_t, size_t) __INTRODUCED_IN(24);
|
||||||
ssize_t __readlink_chk(const char*, char*, size_t, size_t) __INTRODUCED_IN(23);
|
ssize_t __readlink_chk(const char* _Nonnull, char* _Nonnull, size_t, size_t) __INTRODUCED_IN(23);
|
||||||
ssize_t __readlinkat_chk(int dirfd, const char*, char*, size_t, size_t) __INTRODUCED_IN(23);
|
ssize_t __readlinkat_chk(int dirfd, const char* _Nonnull, char* _Nonnull, size_t, size_t) __INTRODUCED_IN(23);
|
||||||
|
|
||||||
#if defined(__BIONIC_FORTIFY)
|
#if defined(__BIONIC_FORTIFY)
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ ssize_t __readlinkat_chk(int dirfd, const char*, char*, size_t, size_t) __INTROD
|
||||||
__builtin_constant_p(index) && (index) <= SSIZE_MAX))
|
__builtin_constant_p(index) && (index) <= SSIZE_MAX))
|
||||||
|
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
char* getcwd(char* const __pass_object_size buf, size_t size)
|
char* _Nullable getcwd(char* const _Nullable __pass_object_size buf, size_t size)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_objectsize(size, __bos(buf), getcwd) {
|
__error_if_overflows_objectsize(size, __bos(buf), getcwd) {
|
||||||
#if __ANDROID_API__ >= 24 && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
|
#if __ANDROID_API__ >= 24 && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
|
||||||
|
@ -85,7 +85,7 @@ char* getcwd(char* const __pass_object_size buf, size_t size)
|
||||||
|
|
||||||
#if !defined(__USE_FILE_OFFSET64)
|
#if !defined(__USE_FILE_OFFSET64)
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
ssize_t pread(int fd, void* const __pass_object_size0 buf, size_t count, off_t offset)
|
ssize_t pread(int fd, void* const _Nonnull __pass_object_size0 buf, size_t count, off_t offset)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_ssizet(count, pread)
|
__error_if_overflows_ssizet(count, pread)
|
||||||
__error_if_overflows_objectsize(count, __bos0(buf), pread) {
|
__error_if_overflows_objectsize(count, __bos0(buf), pread) {
|
||||||
|
@ -101,7 +101,7 @@ ssize_t pread(int fd, void* const __pass_object_size0 buf, size_t count, off_t o
|
||||||
#endif /* !defined(__USE_FILE_OFFSET64) */
|
#endif /* !defined(__USE_FILE_OFFSET64) */
|
||||||
|
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
ssize_t pread64(int fd, void* const __pass_object_size0 buf, size_t count, off64_t offset)
|
ssize_t pread64(int fd, void* const _Nonnull __pass_object_size0 buf, size_t count, off64_t offset)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_ssizet(count, pread64)
|
__error_if_overflows_ssizet(count, pread64)
|
||||||
__error_if_overflows_objectsize(count, __bos0(buf), pread64) {
|
__error_if_overflows_objectsize(count, __bos0(buf), pread64) {
|
||||||
|
@ -117,7 +117,7 @@ ssize_t pread64(int fd, void* const __pass_object_size0 buf, size_t count, off64
|
||||||
|
|
||||||
#if !defined(__USE_FILE_OFFSET64)
|
#if !defined(__USE_FILE_OFFSET64)
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
ssize_t pwrite(int fd, const void* const __pass_object_size0 buf, size_t count, off_t offset)
|
ssize_t pwrite(int fd, const void* const _Nonnull __pass_object_size0 buf, size_t count, off_t offset)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_ssizet(count, pwrite)
|
__error_if_overflows_ssizet(count, pwrite)
|
||||||
__error_if_overflows_objectsize(count, __bos0(buf), pwrite) {
|
__error_if_overflows_objectsize(count, __bos0(buf), pwrite) {
|
||||||
|
@ -133,7 +133,7 @@ ssize_t pwrite(int fd, const void* const __pass_object_size0 buf, size_t count,
|
||||||
#endif /* !defined(__USE_FILE_OFFSET64) */
|
#endif /* !defined(__USE_FILE_OFFSET64) */
|
||||||
|
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
ssize_t pwrite64(int fd, const void* const __pass_object_size0 buf, size_t count, off64_t offset)
|
ssize_t pwrite64(int fd, const void* const _Nonnull __pass_object_size0 buf, size_t count, off64_t offset)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_ssizet(count, pwrite64)
|
__error_if_overflows_ssizet(count, pwrite64)
|
||||||
__error_if_overflows_objectsize(count, __bos0(buf), pwrite64) {
|
__error_if_overflows_objectsize(count, __bos0(buf), pwrite64) {
|
||||||
|
@ -148,7 +148,7 @@ ssize_t pwrite64(int fd, const void* const __pass_object_size0 buf, size_t count
|
||||||
}
|
}
|
||||||
|
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
ssize_t read(int fd, void* const __pass_object_size0 buf, size_t count)
|
ssize_t read(int fd, void* const __BIONIC_COMPLICATED_NULLNESS __pass_object_size0 buf, size_t count)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_ssizet(count, read)
|
__error_if_overflows_ssizet(count, read)
|
||||||
__error_if_overflows_objectsize(count, __bos0(buf), read) {
|
__error_if_overflows_objectsize(count, __bos0(buf), read) {
|
||||||
|
@ -163,7 +163,7 @@ ssize_t read(int fd, void* const __pass_object_size0 buf, size_t count)
|
||||||
}
|
}
|
||||||
|
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
ssize_t write(int fd, const void* const __pass_object_size0 buf, size_t count)
|
ssize_t write(int fd, const void* const __BIONIC_COMPLICATED_NULLNESS __pass_object_size0 buf, size_t count)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_ssizet(count, write)
|
__error_if_overflows_ssizet(count, write)
|
||||||
__error_if_overflows_objectsize(count, __bos0(buf), write) {
|
__error_if_overflows_objectsize(count, __bos0(buf), write) {
|
||||||
|
@ -178,7 +178,7 @@ ssize_t write(int fd, const void* const __pass_object_size0 buf, size_t count)
|
||||||
}
|
}
|
||||||
|
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
ssize_t readlink(const char* path, char* const __pass_object_size buf, size_t size)
|
ssize_t readlink(const char* _Nonnull path, char* _Nonnull const __pass_object_size buf, size_t size)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_ssizet(size, readlink)
|
__error_if_overflows_ssizet(size, readlink)
|
||||||
__error_if_overflows_objectsize(size, __bos(buf), readlink) {
|
__error_if_overflows_objectsize(size, __bos(buf), readlink) {
|
||||||
|
@ -193,7 +193,7 @@ ssize_t readlink(const char* path, char* const __pass_object_size buf, size_t si
|
||||||
}
|
}
|
||||||
|
|
||||||
__BIONIC_FORTIFY_INLINE
|
__BIONIC_FORTIFY_INLINE
|
||||||
ssize_t readlinkat(int dirfd, const char* path, char* const __pass_object_size buf, size_t size)
|
ssize_t readlinkat(int dirfd, const char* _Nonnull path, char* const _Nonnull __pass_object_size buf, size_t size)
|
||||||
__overloadable
|
__overloadable
|
||||||
__error_if_overflows_ssizet(size, readlinkat)
|
__error_if_overflows_ssizet(size, readlinkat)
|
||||||
__error_if_overflows_objectsize(size, __bos(buf), readlinkat) {
|
__error_if_overflows_objectsize(size, __bos(buf), readlinkat) {
|
||||||
|
|
Loading…
Reference in a new issue