opnsense-src/lib/libc
Dimitry Andric ef314cd4ba Fix null pointer subtraction in mergesort()
Clang 13 produces the following warning for this function:

lib/libc/stdlib/merge.c:137:41: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
        if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE))
                                               ^ ~~~~~~~~~

This is meant to check whether the size and base parameters are aligned
to the size of an int, so use our __is_aligned() macro instead.

Also remove the comment that indicated this "stupid subtraction" was
done to pacify some ancient and unknown Cray compiler, and which has
been there since the BSD 4.4 Lite Lib Sources were imported.

(cherry picked from commit 4e5d32a445)
2021-08-31 21:05:43 +02:00
..
aarch64 libc: add _get_tp() private function 2021-04-23 14:14:07 +03:00
amd64 libc: add _get_tp() private function 2021-04-23 14:14:07 +03:00
arm libc: add _get_tp() private function 2021-04-23 14:14:07 +03:00
capability Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
compat-43 Adjust history, info source from v1's manuals 2019-09-04 13:44:46 +00:00
db tools/build: Don't redefine open() for the linux bootstrap 2021-08-05 10:00:45 +01:00
gdtoa Remove sparc64 specific parts of libc. 2020-02-26 18:55:09 +00:00
gen libc tls: use TLS_DTV_OFFSET defined by rtld.h 2021-08-23 12:20:56 +03:00
gmon mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
i386 libc: add _get_tp() private function 2021-04-23 14:14:07 +03:00
iconv Remove the SYMVER build option. 2020-04-30 22:08:40 +00:00
include Style 2021-08-12 15:37:54 +03:00
inet libc: fix cases of undefined behavior. 2018-08-07 15:24:19 +00:00
isc SPDX: more ISC-related files. 2017-12-08 17:52:53 +00:00
locale libc/locale: Use O_CLOEXEC when opening locale tables 2021-08-05 08:45:22 -04:00
md Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
mips libc: add _get_tp() private function 2021-04-23 14:14:07 +03:00
nameser Bounds check again after advancing cp, otherwise we have a possible 2019-09-05 19:35:30 +00:00
net Correct section reference for examples in RFC3542 2021-08-04 09:15:27 +01:00
nls Implement strerror_l(). 2020-12-16 09:02:09 +00:00
posix1e Fix leak in libc NFSv4 ACL flags parsing 2021-04-23 06:41:23 -04:00
powerpc libc: add _get_tp() private function 2021-04-23 14:14:07 +03:00
powerpc64 libc: add _get_tp() private function 2021-04-23 14:14:07 +03:00
powerpcspe [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask(). 2021-03-08 12:39:33 -06:00
quad Add casts and L suffixes to libc quad support, to work around various 2020-02-17 20:14:59 +00:00
regex libc: regex: rework unsafe pointer arithmetic 2021-01-08 13:58:35 -06:00
resolv Rather than using the legacy IP struct fields in the union for the 2019-06-04 20:53:35 +00:00
riscv libc: add _get_tp() private function 2021-04-23 14:14:07 +03:00
rpc rpc(3): Correct a few common typos in source code comments 2021-08-25 08:25:12 +02:00
secure Remove the SYMVER build option. 2020-04-30 22:08:40 +00:00
softfloat Add implementations for clog(3), clogf(3), and clog(3). 2018-05-13 09:54:34 +00:00
stdio fread: improve performance for unbuffered reads 2021-06-15 16:26:31 -05:00
stdlib Fix null pointer subtraction in mergesort() 2021-08-31 21:05:43 +02:00
stdtime strptime: make %k and %l specifiers match their description in 2018-11-03 23:37:13 +00:00
string libc: add mempcpy(3) and wmempcpy(3) 2021-07-22 13:33:10 +03:00
sys kenv: allow listing of static kernel environments 2021-08-26 01:35:33 -05:00
tests resolv_test: Fix racy exit check, remove mutexes, and reduce output 2021-04-10 14:01:05 +01:00
uuid libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
x86 x86 __vdso_gettc: add O_CLOEXEC flag to open 2021-08-05 03:56:46 +03:00
xdr typo: s/impelmentation/implementation/. 2020-02-07 15:14:29 +00:00
yp Increase the size of the send and receive buffers for YP client rpc 2019-09-16 06:42:01 +00:00
libc.ldscript
libc_nossp.ldscript Add different libc ldscript: the one without libssp -- 2016-10-12 13:19:21 +00:00
Makefile libc: include rtld.h into static implementations of rtld interface 2021-04-23 14:14:07 +03:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Update libssp paths in various Makefile.depend* files 2020-01-06 18:15:55 +00:00
Versions.def Create namespace for the symbols added during 14-CURRENT cycle. 2021-07-22 13:33:10 +03:00