glibc/posix
Adhemerval Zanella Netto df43ea489c posix: Fix test-errno build with fortify enable
With gcc 11.3.1, building with -D_FORTIFY_SOURCE=2 shows:

In function ‘getgroups’,
    inlined from ‘do_test’ at test-errno.c:129:12:
../misc/sys/cdefs.h:195:6: error: argument 1 value -1 is negative
[-Werror=stringop-overflow=]
  195 |    ? __ ## f ## _alias (__VA_ARGS__)
      \
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:115:10: note: in expansion of macro
‘__glibc_fortify’
  115 |   return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
      |          ^~~~~~~~~~~~~~~
../posix/bits/unistd.h: In function ‘do_test’:
../posix/bits/unistd-decl.h:135:28: note: in a call to function
‘__getgroups_alias’ declared with attribute ‘access (write_only, 2, 1)’
  135 | extern int __REDIRECT_NTH (__getgroups_alias, (int __size,
      __gid_t __list[]),
      |                            ^~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:264:6: note: in definition of macro ‘__REDIRECT_NTH’
  264 |      name proto __asm__ (__ASMNAME (#alias)) __THROW

It builds fine with gcc 12 and gcc 13.

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-07-26 09:45:46 -03:00
..
bits unistd: Avoid PLT entries with _FORTIFY_SOURCE 2023-07-05 16:59:48 +02:00
bug-ga2.root/etc
rxspencer Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
sys
BOOST.tests Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
Depend
Makefile posix/bits/unistd.h: Clearly separate declaration from definitions 2023-07-05 16:59:48 +02:00
PCRE.tests
PTESTS Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
PTESTS2C.sed
TESTS
TESTS2C.sed
Versions
_Fork.c
_exit.c
alarm.c
annexc.c
bsd-getpgrp.c
bug-ga1.c
bug-ga2.c
bug-getopt1.c
bug-getopt2.c
bug-getopt3.c
bug-getopt4.c
bug-getopt5.c
bug-glob2.c
bug-glob3.c
bug-regex1.c
bug-regex2.c
bug-regex3.c
bug-regex4.c
bug-regex5.c
bug-regex6.c
bug-regex7.c
bug-regex8.c
bug-regex9.c
bug-regex10.c
bug-regex11.c
bug-regex12.c
bug-regex13.c
bug-regex14.c
bug-regex15.c
bug-regex16.c
bug-regex17.c
bug-regex18.c
bug-regex19.c
bug-regex20.c
bug-regex21.c
bug-regex22.c
bug-regex23.c
bug-regex24.c
bug-regex25.c
bug-regex26.c
bug-regex27.c
bug-regex28.c
bug-regex29.c
bug-regex30.c
bug-regex31.c
bug-regex31.input
bug-regex32.c
bug-regex33.c
bug-regex34.c
bug-regex35.c
bug-regex36.c
bug-regex37.c
bug-regex38.c
confstr.c
cpio.h
environ.c
execl.c
execle.c
execlp.c
execv.c
execve.c
execveat.c
execvp.c
execvpe.c
fexecve.c
flexmember.h
fnmatch.c
fnmatch.h
fnmatch_loop.c
fork.c
fpathconf.c
gai.conf
gai_strerror.c
get_child_max.c
getaddrinfo.c
getconf-speclist.c
getconf.c
getegid.c
geteuid.c
getgid.c
getgroups.c
getopt.c
getopt.h
getopt1.c
getopt_int.h
getpgid.c
getpgrp.c
getpid.c
getppid.c
getresgid.c
getresuid.c
getsid.c
getuid.c
glob-lstat-compat.c
glob.c
glob.h
glob64-lstat-compat.c
glob64-time64.c __glob64_time64: Fix typo for stub_warning call (BZ #30146) 2023-02-20 13:44:48 +01:00
glob64.c
glob_internal.h
glob_pattern_p.c
globfree.c
globfree64-time64.c
globfree64.c
globtest.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
globtest.sh
group_member.c
init-posix.c
nanosleep.c
pathconf.c
pause.c
posix-conf-vars.h
posix-conf-vars.list
posix-envs.def
posix_madvise.c
pread.c
pread64.c
pwrite.c
pwrite64.c
re_comp.h
regcomp.c Fix regex type usage 2023-05-01 09:08:59 -04:00
regex.c
regex.h
regex_internal.c
regex_internal.h
regexbug1.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
regexec.c
register-atfork.c Move libc_freeres_ptrs and libc_subfreeres to hidden/weak functions 2023-03-27 13:57:55 -03:00
runptests.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
runtests.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
sched.h
sched_cpualloc.c
sched_cpucount.c
sched_cpufree.c
sched_getaffinity.c
sched_getp.c
sched_gets.c
sched_primax.c
sched_primin.c
sched_rr_gi.c
sched_setaffinity.c
sched_setp.c
sched_sets.c
sched_yield.c
setgid.c
setpgid.c
setpgrp.c
setresgid.c
setresuid.c
setsid.c
setuid.c
shm-directory.c rt: fix shm_open not set ENAMETOOLONG when name exceeds {_POSIX_PATH_MAX} 2023-03-08 10:11:54 -03:00
sleep.c
spawn.c
spawn.h Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
spawn_faction_addchdir.c
spawn_faction_addclose.c
spawn_faction_addclosefrom.c
spawn_faction_adddup2.c
spawn_faction_addfchdir.c
spawn_faction_addopen.c
spawn_faction_addtcsetpgrp_np.c
spawn_faction_destroy.c
spawn_faction_init.c
spawn_int.h
spawn_valid_fd.c
spawnattr_destroy.c
spawnattr_getdefault.c
spawnattr_getflags.c
spawnattr_getpgroup.c
spawnattr_getschedparam.c
spawnattr_getschedpolicy.c
spawnattr_getsigmask.c
spawnattr_init.c
spawnattr_setdefault.c
spawnattr_setflags.c
spawnattr_setpgroup.c
spawnattr_setschedparam.c
spawnattr_setschedpolicy.c
spawnattr_setsigmask.c
spawni.c
spawnp.c
streams-compat.c
sysconf.c
tar.h
test-errno.c posix: Fix test-errno build with fortify enable 2023-07-26 09:45:46 -03:00
test-ssize-max.c
test-vfork.c
testfnm.c
times.c
transbug.c
tst-_Fork.c
tst-boost.c
tst-chmod.c tests: Replace various function calls with their x variant 2023-06-06 08:23:53 -04:00
tst-cpucount.c
tst-cpuset.c
tst-dir.c
tst-exec-static.c
tst-exec.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-execl1.c
tst-execl2.c tests: fix warn unused result on asprintf calls 2023-06-06 08:23:53 -04:00
tst-execle1.c
tst-execle2.c tests: fix warn unused result on asprintf calls 2023-06-06 08:23:53 -04:00
tst-execlp1.c
tst-execlp2.c tests: fix warn unused result on asprintf calls 2023-06-06 08:23:53 -04:00
tst-execv1.c
tst-execv2.c tests: fix warn unused result on asprintf calls 2023-06-06 08:23:53 -04:00
tst-execve1.c
tst-execve2.c tests: fix warn unused result on asprintf calls 2023-06-06 08:23:53 -04:00
tst-execveat.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-execvp1.c
tst-execvp2.c tests: fix warn unused result on asprintf calls 2023-06-06 08:23:53 -04:00
tst-execvp3.c
tst-execvp4.c
tst-execvpe1.c
tst-execvpe2.c
tst-execvpe3.c
tst-execvpe4.c
tst-execvpe5.c
tst-execvpe6.c
tst-fexecve.c
tst-fnmatch.c
tst-fnmatch.input
tst-fnmatch2.c
tst-fnmatch3.c
tst-fnmatch4.c
tst-fnmatch5.c
tst-fnmatch6.c
tst-fnmatch7.c
tst-fork.c
tst-gai_strerror.c posix: Add test case for gai_strerror() 2023-06-13 20:55:02 +02:00
tst-getaddrinfo.c
tst-getaddrinfo2.c
tst-getaddrinfo3.c
tst-getaddrinfo4.c
tst-getaddrinfo5.c
tst-getconf.sh
tst-getopt-cancel.c tests: replace ftruncate by xftruncate 2023-06-01 12:45:13 -04:00
tst-getopt_long1.c
tst-glob-tilde.c
tst-glob_lstat_compat.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-glob_symlinks.c
tst-gnuglob-skeleton.c
tst-gnuglob.c
tst-gnuglob64-time64.c
tst-gnuglob64.c
tst-mmap-offset.c
tst-mmap.c
tst-nanosleep.c
tst-nice.c tests: fix warn unused results 2023-06-01 13:01:32 -04:00
tst-pathconf.c
tst-pcre.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-posix_fadvise-common.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-posix_fadvise.c
tst-posix_fadvise64.c
tst-posix_spawn-fd.c
tst-posix_spawn-setsid.c
tst-preadwrite-common.c
tst-preadwrite.c
tst-preadwrite64.c
tst-regcomp-truncated.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-regex.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-regex.input Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-regex2.c
tst-regexloc.c
tst-rfc3484-2.c
tst-rfc3484-3.c
tst-rfc3484.c
tst-rxspencer-no-utf8.c
tst-rxspencer.c
tst-sched_getaffinity.c
tst-sched_rr_get_interval-time64.c
tst-sched_rr_get_interval.c
tst-spawn-chdir.c
tst-spawn-static.c
tst-spawn.c
tst-spawn2.c
tst-spawn3.c
tst-spawn4-compat.c
tst-spawn4.c
tst-spawn5.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-spawn6.c
tst-spawn7.c posix: Ensure the initial signal disposition for tst-spawn7 2023-03-08 10:08:40 -03:00
tst-sysconf-empty-chroot.c
tst-sysconf.c
tst-truncate-common.c
tst-truncate.c
tst-truncate64.c
tst-vfork1.c
tst-vfork2.c
tst-vfork3.c
tst-wait-skeleton.c
tst-wait3-time64.c
tst-wait3.c
tst-wait4-time64.c
tst-wait4.c
tst-waitid.c
tst-wordexp-nocmd.c
tstgetopt.c
uname-values.h
uname.c
unistd.h
vfork.c
wait.c
wait.h
wait3.c
wait4.c
waitid.c
waitpid.c
wordexp-test.c tests: Replace various function calls with their x variant 2023-06-06 08:23:53 -04:00
wordexp-tst.sh
wordexp.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
wordexp.h