glibc/debug
Joseph Myers 0f201f4a81 Implement C23 memset_explicit (bug 32378)
Add the C23 memset_explicit function to glibc.  Everything here is
closely based on the approach taken for explicit_bzero.  This includes
the bits that relate to internal uses of explicit_bzero within glibc
(although we don't currently have any such internal uses of
memset_explicit), and also includes the nonnull attribute (when we
move to nonnull_if_nonzero for various functions following C2y, this
function should be included in that change).

The function is declared both for __USE_MISC and for __GLIBC_USE (ISOC23)
(so by default not just for compilers defaulting to C23 mode).

Tested for x86_64 and x86.
2025-10-01 15:14:09 +00:00
..
Depend
Makefile Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
Versions Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
asprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
backtrace-tst.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
backtrace.c Disable SFrame support by default 2025-07-24 15:51:58 -03:00
backtracesyms.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
backtracesymsfd.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
chk_fail.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
confstr_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
execinfo.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
explicit_bzero_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fdelt_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fgets_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fgets_u_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fgetws_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fgetws_u_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fortify_fail.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fread_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fread_u_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fwprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
getcwd_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
getdomainname_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
getgroups_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gethostname_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gets_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
getwd_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
inet_ntop_chk.c Add _FORTIFY_SOURCE support for inet_ntop 2025-03-21 09:35:42 +01:00
inet_pton_chk.c Add _FORTIFY_SOURCE support for inet_pton 2025-03-24 14:43:03 -04:00
longjmp_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mbsnrtowcs_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mbsrtowcs_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mbstowcs_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
memcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
memmove_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mempcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
memset_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
memset_explicit_chk.c Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
noophooks.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
obprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pcprofile.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pcprofiledump.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
poll_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ppoll_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pread64_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pread_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
printf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
read_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
readlink_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
readlinkat_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
readonly-area.c debug: Improve '%n' fortify detection (BZ 30932) 2025-03-21 15:46:48 -03:00
realpath_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
recv_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
recvfrom_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
snprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stack_chk_fail.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stack_chk_fail_local.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stpcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stpncpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
strcat_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
strcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
strlcat_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
strlcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
strncat_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
strncpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
swprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
test-stpcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
test-strcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-backtrace.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-backtrace1.c Disable SFrame support by default 2025-07-24 15:51:58 -03:00
tst-backtrace2.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-backtrace3.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-backtrace4.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-backtrace5.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-backtrace6.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-chk-cancel.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-fortify-syslog.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-fortify-wide.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-fortify.c Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
tst-longjmp_chk.c debug: Adapt fortify tests to libsupport 2023-12-29 10:57:03 -03:00
tst-longjmp_chk2.c debug: Adapt fortify tests to libsupport 2023-12-29 10:57:03 -03:00
tst-longjmp_chk3.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-realpath-chk.c fortify: Fix spurious warning with realpath 2021-12-17 18:49:27 +05:30
tst-sprintf-fortify-rdonly-dlopen.c debug: Improve '%n' fortify detection (BZ 30932) 2025-03-21 15:46:48 -03:00
tst-sprintf-fortify-rdonly-mod.c debug: Improve '%n' fortify detection (BZ 30932) 2025-03-21 15:46:48 -03:00
tst-sprintf-fortify-rdonly-static.c elf: Initialize GLRO (dl_read_only_area) after static dlopen (bug 33139) 2025-07-18 19:58:59 +02:00
tst-sprintf-fortify-rdonly.c debug: Improve '%n' fortify detection (BZ 30932) 2025-03-21 15:46:48 -03:00
tst-sprintf-fortify-unchecked.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-ssp-1.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ttyname_r_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vasprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vdprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vfprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vfwprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vobprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vsnprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vsprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vswprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
vwprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcpcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcpncpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcrtomb_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcscat_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcscpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcslcat_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcslcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcsncat_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcsncpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcsnrtombs_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcsrtombs_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcstombs_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wctomb_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wmemcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wmemmove_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wmempcpy_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wmemset_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wprintf_chk.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
xtrace.sh Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00