glibc/string
Joseph Myers 2c6cabb3a4 Correct access attribute on memfrob (bug 28475)
As noted in bug 28475, the access attribute on memfrob in <string.h>
is incorrect: the function both reads and writes the memory pointed to
by its argument, so it needs to use __read_write__, not
__write_only__.  This incorrect attribute results in a build failure
for accessing uninitialized memory for s390x-linux-gnu-O3 with
build-many-glibcs.py using GCC mainline.

Correct the attribute.  Fixing this shows up that some calls to
memfrob in elf/ tests are reading uninitialized memory; I'm not
entirely sure of the purpose of those calls, but guess they are about
ensuring that the stack space is indeed allocated at that point in the
function, and so it matters that they are calling a function whose
semantics are unknown to the compiler.  Thus, change the first memfrob
call in those tests to use explicit_bzero instead, as suggested by
Florian in
<https://sourceware.org/pipermail/libc-alpha/2021-October/132119.html>,
to avoid the use of uninitialized memory.

Tested for x86_64, and with build-many-glibcs.py (GCC mainline) for
s390x-linux-gnu-O3.
2021-10-20 13:38:50 +00:00
..
bits Don't add access size hints to fortifiable functions 2021-10-20 08:33:31 +05:30
_strerror.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
argz-addsep.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-append.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-count.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-create.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-ctsep.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-delete.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-extract.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-insert.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-next.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-replace.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz-stringify.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
argz.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
basename.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bcopy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bug-envz1.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
bug-strcoll1.c
bug-strcoll2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bug-strncat1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
bug-strpbrk1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
bug-strspn1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
bug-strtok1.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
byteswap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bzero.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Depend
endian.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
envz.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
envz.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
explicit_bzero.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ffs.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ffsll.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
inl-tester.c
Makefile dlfcn: Cleanups after -ldl is no longer required 2021-06-03 09:11:45 +02:00
memccpy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memchr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcpy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memfrob.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memmem.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memmove.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memory.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mempcpy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memrchr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
noinl-tester.c
rawmemchr.c string: Work around GCC PR 98512 in rawmemchr 2021-02-19 13:29:00 +01:00
sigabbrev_np.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sigdescr_np.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stpcpy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stpncpy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
str-two-way.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stratcliff.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strcasecmp_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcasecmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcasestr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strchr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strchrnul.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcoll_l.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strcoll.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strcpy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcspn.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strdup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strerror_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strerror.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strerrordesc_np.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strerrorname_np.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strfry.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
string-inlines.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
string.h Correct access attribute on memfrob (bug 28475) 2021-10-20 13:38:50 +00:00
strings.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strlen.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strncase_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strncase.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strncat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strncmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strncpy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strndup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strnlen.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strpbrk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strrchr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strsep.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strsignal.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strspn.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strstr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strtok_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strtok.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strverscmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strxfrm_l.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strxfrm.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
swab.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-bcopy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-bzero.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-endian-file-scope.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-endian-sign-conversion.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-endian-types.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-explicit_bzero.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-ffs.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-memccpy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-memchr.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-memcmp.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-memcpy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-memmem.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-memmove.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-mempcpy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-memrchr.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-memset.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-rawmemchr.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-sig_np.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-stpcpy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-stpncpy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strcasecmp.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strcasestr.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strcat.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strchr.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strchrnul.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-strcmp.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strcpy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strcspn.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strerror-errno.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-string.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strlen.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strncasecmp.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strncat.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strncmp.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strncpy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strnlen.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strpbrk.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strrchr.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strspn.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-strstr.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
testcopy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tester.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-bswap.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-endian.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
tst-inlcall.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-memmove-overflow.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-strcoll-overflow.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-strerror.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-strfry.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
tst-strlen.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
tst-strsignal.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-strtok_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-strtok.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
tst-strxfrm2.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
tst-strxfrm.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
tst-svc2.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
tst-svc.c Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
tst-svc.expect * string/strverscmp.c (__strverscmp): Fix last cleanups. 2009-04-07 06:51:59 +00:00
tst-svc.input * string/strverscmp.c (__strverscmp): Fix last cleanups. 2009-04-07 06:51:59 +00:00
tst-xbzero-opt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions string: Add strerrorname_np and strerrordesc_np 2020-07-07 15:02:57 -03:00
wordcopy.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
xpg-strerror.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00