plural.y:51.1-7: warning: POSIX Yacc does not support %define [-Wyacc]
51 | %define api.pure full
| ^~~~~~~
plural.y:52.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
52 | %expect 7
| ^~~~~~~
/bin/sh: line 1: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/dso-sort-tests-all2.def: No such file or directory
/bin/sh: line 1: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/dso-sort-tests-all3.def: No such file or directory
/bin/sh: line 1: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/dso-sort-tests-all4.def: No such file or directory
Makefile:68: warning: pattern recipe did not update peer target 'top-menu./var/pisi/glibc-2.42-17/work/glibc-2.42/build/manual/texi'.
Makefile:68: warning: pattern recipe did not update peer target 'chapters./var/pisi/glibc-2.42-17/work/glibc-2.42/build/manual/texi'.
+ env GCONV_PATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconvdata LOCPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/localedata LC_ALL=C LOCPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconv /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/ld-linux-x86-64.so.2 --library-path /var/pisi/glibc-2.42-17/work/glibc-2.42/build:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/math:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/dlfcn:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/nss:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/nis:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/rt:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/resolv:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/mathvec:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/support:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/misc:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug:/var/pisi/glibc-2.42-17/work/glibc-2.42/build/nptl:/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.0/../../../../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.0/../../../../lib/ /var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconv/tst-translit-mchar
+ common_objpfx=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/
+ test_wrapper_env=' env'
+ run_program_env='GCONV_PATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconvdata LOCPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/localedata LC_ALL=C'
+ LIBPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/
+ testroot=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory
+ trap cleanup 0
+ rm -rf /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory
+ mkdir -p /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory
+ env GCONV_PATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconvdata LOCPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/localedata LC_ALL=C LANG= LC_ALL=invalid-locale LOCPATH=does-not-exist /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/ld.so --library-path /var/pisi/glibc-2.42-17/work/glibc-2.42/build/ /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/locale
+ echo '* standard error'
+ cat /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory/stderr
+ echo '* standard output'
+ cat /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory/stdout
+ cat
+ cat
+ errors=0
+ cmp -s /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory/stderr-expected /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory/stderr
+ cmp -s /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory/stdout-expected /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory/stdout
+ exit 0
+ cleanup
+ rm -rf /var/pisi/glibc-2.42-17/work/glibc-2.42/build/locale/tst-locale-locpath-directory
Testing ASCII
Testing ISO646-GB
Testing ISO646-CA
Testing ISO646-CA2
Testing ISO646-DE
Testing ISO646-DK
Testing ISO646-ES
Testing ISO646-ES2
Testing ISO646-CN
Testing ISO646-IT
Testing ISO646-JP
Testing ISO646-JP-OCR-B
Testing ISO646-YU
Testing ISO646-KR
Testing ISO646-HU
Testing ISO646-CU
Testing ISO646-FR
Testing ISO646-FR1
Testing ISO646-NO
Testing ISO646-NO2
Testing ISO646-PT
Testing ISO646-PT2
Testing ISO646-SE
Testing ISO646-SE2
Testing ISO-8859-1
Testing ISO-8859-2
Testing ISO-8859-3
Testing ISO-8859-4
Testing ISO-8859-5
Testing ISO-8859-6
Testing ISO-8859-7
Testing ISO-8859-8
Testing ISO-8859-9
Testing ISO-8859-9E
Testing ISO-8859-10
Testing ISO-8859-11
Testing ISO-8859-13
Testing ISO-8859-14
Testing ISO-8859-15
Testing ISO-8859-16
Testing T.61-8BIT
Testing ISO_6937
Testing KOI-8
Testing KOI8-R
Testing LATIN-GREEK
Testing LATIN-GREEK-1
Testing HP-ROMAN8
Testing HP-ROMAN9
Testing HP-TURKISH8
Testing HP-THAI8
Testing HP-GREEK8
Testing EBCDIC-AT-DE
Testing EBCDIC-AT-DE-A
Testing EBCDIC-CA-FR
Testing EBCDIC-DK-NO
Testing EBCDIC-DK-NO-A
Testing EBCDIC-ES
Testing EBCDIC-ES-A
Testing EBCDIC-ES-S
Testing EBCDIC-FI-SE
Testing EBCDIC-FI-SE-A
Testing EBCDIC-FR
Testing EBCDIC-IS-FRISS
Testing EBCDIC-IT
Testing EBCDIC-PT
Testing EBCDIC-UK
Testing EBCDIC-US
Testing IBM037
Testing IBM038
Testing IBM256
Testing IBM273
Testing IBM274
Testing IBM275
Testing IBM277
Testing IBM278
Testing IBM280
Testing IBM281
Testing IBM284
Testing IBM285
Testing IBM290
Testing IBM297
Testing IBM420
Testing IBM423
Testing IBM424
Testing IBM437
Testing IBM500
Testing IBM850
Testing IBM851
Testing IBM852
Testing IBM855
Testing IBM856
Testing IBM857
Testing IBM858
Testing IBM860
Testing IBM861
Testing IBM862
Testing IBM863
Testing IBM864
Testing IBM865
Testing IBM866
Testing IBM866NAV
Testing IBM868
Testing IBM869
Testing IBM870
Testing IBM871
Testing IBM875
Testing IBM880
Testing IBM891
Testing IBM903
Testing IBM904
Testing IBM905
Testing IBM918
Testing IBM922
Testing IBM1004
Testing IBM1026
Testing IBM1047
Testing IBM1124
Testing IBM1129
Testing IBM1160
Testing IBM1161
Testing IBM1132
Testing IBM1133
Testing IBM1162
Testing IBM1163
Testing IBM1164
Testing CP1125
Testing CP1250
Testing CP1251
Testing CP1252
Testing CP1253
Testing CP1254
Testing CP1255
Testing CP1256
Testing CP1257
Testing CP1258
Testing IBM874
Testing CP737
Testing CP770
Testing CP771
Testing CP772
Testing CP773
Testing CP774
Testing CP775
Testing MACINTOSH
Testing IEC_P27-1
Testing ASMO_449
Testing ISO-IR-99
Testing ISO-IR-139
Testing CWI
Testing DEC-MCS
Testing ECMA-CYRILLIC
Testing ISO-IR-153
Testing GREEK-CCITT
Testing GREEK7
Testing GREEK7-OLD
Testing INIS
Testing INIS-8
Testing INIS-CYRILLIC
Testing ISO_2033
Testing ISO_5427
Testing ISO_5427-EXT
Testing ISO_10367-BOX
Testing MAC-IS
Testing MAC-UK
Testing CP10007
Testing NATS-DANO
Testing NATS-SEFI
Testing WIN-SAMI-2
Testing ISO-IR-197
Testing TIS-620
Testing KOI8-U
Testing VISCII
Testing KOI8-T
Testing GEORGIAN-PS
Testing GEORGIAN-ACADEMY
Testing ISO-IR-209
Testing MAC-SAMI
Testing ARMSCII-8
Testing TCVN5712-1
Testing TSCII
Testing PT154
Testing RK1048
Testing MIK
Testing BRF
Testing MAC-CENTRALEUROPE
Testing KOI8-RU
Testing SJIS
Testing CP932
Testing EUC-KR
Testing CP949
Testing JOHAB
Testing BIG5
Testing BIG5HKSCS
Testing EUC-JP
Testing EUC-JP-MS
Testing EUC-CN
Testing GBK
Testing EUC-TW
This might take a while
Testing GB18030
Testing EUC-JISX0213
Testing SHIFT_JISX0213
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/support/libsupport_nonshared.a(xdlfcn.oS): in function `xdlopen':
/var/pisi/glibc-2.42-17/work/glibc-2.42/support/xdlfcn.c:26:(.text+0x5): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/stdlib/test-canon2.o: in function `do_prepare':
/var/pisi/glibc-2.42-17/work/glibc-2.42/stdlib/test-canon2.c:50:(.text+0xf5): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/stdio-common/temptest.o: in function `main':
/var/pisi/glibc-2.42-17/work/glibc-2.42/stdio-common/temptest.c:14:(.text.startup+0x2a): warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/stdio-common/tst-gets.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/stdio-common/tst-gets.c:34:(.text+0xa): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/stdio-common/tst-tmpnam.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/stdio-common/tst-tmpnam.c:31:(.text+0x23): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/libio/tst-bz24153.o: in function `narrow':
/var/pisi/glibc-2.42-17/work/glibc-2.42/libio/tst-bz24153.c:75:(.text+0x4d7): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/dlfcn/tststatic.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/dlfcn/tststatic.c:12:(.text+0xe): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/dlfcn/tststatic2.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/dlfcn/tststatic2.c:154:(.text+0x24d): warning: Using 'dlmopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/dlfcn/tststatic2.c:12:(.text+0x19): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/dlfcn/tststatic3.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/dlfcn/tststatic3.c:40:(.text+0x17): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/dlfcn/tststatic4.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/dlfcn/tststatic4.c:49:(.text+0x16): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/dlfcn/tststatic5.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/dlfcn/tststatic5.c:40:(.text+0x11): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/nptl/tst-cancel4_1.o: in function `tf_sendmmsg':
/var/pisi/glibc-2.42-17/work/glibc-2.42/nptl/tst-cancel4_1.c:56:(.text+0x81): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/nptl/tst-cancel4_2.o: in function `tf_recvmmsg':
/var/pisi/glibc-2.42-17/work/glibc-2.42/nptl/tst-cancel4_2.c:51:(.text+0x81): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ../sysdeps/x86/bits/floatn.h:22,
from ../include/stdio.h:7,
from ../sysdeps/pthread/tst-cancel4.c:22:
../sysdeps/pthread/tst-cancel4.c: In function 'tf_sigpause':
../misc/sys/cdefs.h:807:42: warning: sigmask is deprecated
807 | # define __glibc_macro_warning1(message) _Pragma (#message)
| ^~~~~~~
../misc/sys/cdefs.h:809:3: note: in expansion of macro '__glibc_macro_warning1'
809 | __glibc_macro_warning1 (GCC warning message)
| ^~~~~~~~~~~~~~~~~~~~~~
../signal/signal.h:169:3: note: in expansion of macro '__glibc_macro_warning'
169 | __glibc_macro_warning ("sigmask is deprecated") \
| ^~~~~~~~~~~~~~~~~~~~~
../sysdeps/pthread/tst-cancel4.c:535:13: note: in expansion of macro 'sigmask'
535 | sigpause (sigmask (SIGINT));
| ^~~~~~~
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/nptl/tst-cancel4.o: in function `tf_connect':
/var/pisi/glibc-2.42-17/work/glibc-2.42/nptl/../sysdeps/pthread/tst-cancel4.c:1420:(.text+0x13f): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ../sysdeps/x86/bits/floatn.h:22,
from ../include/stdio.h:7,
from ../sysdeps/pthread/tst-cancel4.c:22,
from ../sysdeps/pthread/tst-cancel5.c:1:
../sysdeps/pthread/tst-cancel4.c: In function 'tf_sigpause':
../misc/sys/cdefs.h:807:42: warning: sigmask is deprecated
807 | # define __glibc_macro_warning1(message) _Pragma (#message)
| ^~~~~~~
../misc/sys/cdefs.h:809:3: note: in expansion of macro '__glibc_macro_warning1'
809 | __glibc_macro_warning1 (GCC warning message)
| ^~~~~~~~~~~~~~~~~~~~~~
../signal/signal.h:169:3: note: in expansion of macro '__glibc_macro_warning'
169 | __glibc_macro_warning ("sigmask is deprecated") \
| ^~~~~~~~~~~~~~~~~~~~~
../sysdeps/pthread/tst-cancel4.c:535:13: note: in expansion of macro 'sigmask'
535 | sigpause (sigmask (SIGINT));
| ^~~~~~~
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/nptl/tst-cancel5.o: in function `tf_connect':
/var/pisi/glibc-2.42-17/work/glibc-2.42/nptl/../sysdeps/pthread/tst-cancel4.c:1420:(.text+0x13f): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ../sysdeps/x86/bits/floatn.h:22,
from ../include/stdio.h:7,
from ../sysdeps/pthread/tst-cancel4.c:22,
from ../sysdeps/pthread/tst-cancelx4.c:1:
../sysdeps/pthread/tst-cancel4.c: In function 'tf_sigpause':
../misc/sys/cdefs.h:807:42: warning: sigmask is deprecated
807 | # define __glibc_macro_warning1(message) _Pragma (#message)
| ^~~~~~~
../misc/sys/cdefs.h:809:3: note: in expansion of macro '__glibc_macro_warning1'
809 | __glibc_macro_warning1 (GCC warning message)
| ^~~~~~~~~~~~~~~~~~~~~~
../signal/signal.h:169:3: note: in expansion of macro '__glibc_macro_warning'
169 | __glibc_macro_warning ("sigmask is deprecated") \
| ^~~~~~~~~~~~~~~~~~~~~
../sysdeps/pthread/tst-cancel4.c:535:13: note: in expansion of macro 'sigmask'
535 | sigpause (sigmask (SIGINT));
| ^~~~~~~
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/nptl/tst-cancelx4.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/nptl/../sysdeps/pthread/tst-cancel4-common.c:31:(.text+0x112): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ../sysdeps/x86/bits/floatn.h:22,
from ../include/stdio.h:7,
from ../sysdeps/pthread/tst-cancel4.c:22,
from ../sysdeps/pthread/tst-cancel5.c:1,
from ../sysdeps/pthread/tst-cancelx5.c:1:
../sysdeps/pthread/tst-cancel4.c: In function 'tf_sigpause':
../misc/sys/cdefs.h:807:42: warning: sigmask is deprecated
807 | # define __glibc_macro_warning1(message) _Pragma (#message)
| ^~~~~~~
../misc/sys/cdefs.h:809:3: note: in expansion of macro '__glibc_macro_warning1'
809 | __glibc_macro_warning1 (GCC warning message)
| ^~~~~~~~~~~~~~~~~~~~~~
../signal/signal.h:169:3: note: in expansion of macro '__glibc_macro_warning'
169 | __glibc_macro_warning ("sigmask is deprecated") \
| ^~~~~~~~~~~~~~~~~~~~~
../sysdeps/pthread/tst-cancel4.c:535:13: note: in expansion of macro 'sigmask'
535 | sigpause (sigmask (SIGINT));
| ^~~~~~~
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/nptl/tst-cancelx5.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/nptl/../sysdeps/pthread/tst-cancel4-common.c:31:(.text+0x112): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/nptl/tst-setuid1-static.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/nptl/tst-setuid1.c:1028:(.text+0x1412): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
memory clobbered before allocated block
memory clobbered before allocated block
memory clobbered before allocated block
free(): invalid pointerfree(): invalid pointerfree(): invalid pointerfree(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
../sysdeps/x86/tst-strncmp-rtm.c: In function 'function_overflow2':
../sysdeps/x86/tst-strncasecmp-rtm.c:20:17: warning: 'strncasecmp' specified bound 1152921504606846975 exceeds source size 1024 [-Wstringop-overread]
20 | #define STRNCMP strncasecmp
../sysdeps/x86/tst-strncmp-rtm.c:79:7: note: in expansion of macro 'STRNCMP'
79 | if (STRNCMP (string1, string2, SIZE_MAX >> 4) == 0)
| ^~~~~~~
In file included from ../sysdeps/x86/tst-strncasecmp-rtm.c:23:
../sysdeps/x86/tst-strncmp-rtm.c:40:6: note: source object allocated here
40 | CHAR string1[STRING_SIZE];
| ^~~~~~~
../sysdeps/x86/tst-strncmp-rtm.c: In function 'function_overflow':
../sysdeps/x86/tst-strncasecmp-rtm.c:20:17: warning: 'strncasecmp' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overread]
20 | #define STRNCMP strncasecmp
../sysdeps/x86/tst-strncmp-rtm.c:69:7: note: in expansion of macro 'STRNCMP'
69 | if (STRNCMP (string1, string2, SIZE_MAX) == 0)
| ^~~~~~~
../sysdeps/x86/tst-strncmp-rtm.c: In function 'function_overflow2':
../sysdeps/x86/tst-strncmp-rtm.c:31:19: warning: 'strncmp' specified bound 1152921504606846975 exceeds source size 1024 [-Wstringop-overread]
31 | # define STRNCMP strncmp
| ^
../sysdeps/x86/tst-strncmp-rtm.c:79:7: note: in expansion of macro 'STRNCMP'
79 | if (STRNCMP (string1, string2, SIZE_MAX >> 4) == 0)
| ^~~~~~~
../sysdeps/x86/tst-strncmp-rtm.c:40:6: note: source object allocated here
40 | CHAR string1[STRING_SIZE];
| ^~~~~~~
../sysdeps/x86/tst-strncmp-rtm.c: In function 'function_overflow':
../sysdeps/x86/tst-strncmp-rtm.c:31:19: warning: 'strncmp' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overread]
31 | # define STRNCMP strncmp
| ^
../sysdeps/x86/tst-strncmp-rtm.c:69:7: note: in expansion of macro 'STRNCMP'
69 | if (STRNCMP (string1, string2, SIZE_MAX) == 0)
| ^~~~~~~
warning: -y ignored
warning: -y ignored
warning: -y ignored
warning: -y ignored
warning: -y ignored
warning: -y ignored
warning: -y ignored
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/dirent/opendir-tst1.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/dirent/opendir-tst1.c:65:(.text+0x1d): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/posix/tst-execvp4.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/posix/tst-execvp4.c:29:(.text+0x66): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/posix/tst-execvpe4.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/posix/../posix/tst-execvp4.c:29:(.text+0x66): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/posix/tst-posix_fadvise.o: in function `do_prepare':
/var/pisi/glibc-2.42-17/work/glibc-2.42/posix/tst-posix_fadvise-common.c:44:(.text+0x2a): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/posix/tst-posix_fadvise64.o: in function `do_prepare':
/var/pisi/glibc-2.42-17/work/glibc-2.42/posix/tst-posix_fadvise-common.c:44:(.text+0x2a): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/posix/wordexp-test.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/posix/wordexp-test.c:256:(.text+0x50a): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
a: parameter null or not set
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/misc/tst-sync_file_range.o: in function `do_prepare':
/var/pisi/glibc-2.42-17/work/glibc-2.42/misc/../sysdeps/unix/sysv/linux/tst-sync_file_range.c:47:(.text+0x2a): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from tst-fortify.c:26:
tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: statement with no effect [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
tst-fortify.c: At top level:
tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
tst-fortify.c:118:26: warning: 'wp' defined but not used [-Wunused-variable]
118 | static volatile wchar_t *wp;
| ^~
tst-fortify.c:117:23: warning: 'p' defined but not used [-Wunused-variable]
117 | static volatile char *p;
| ^
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/tst-fortify.c:1034:(.text+0x1944): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/debug/tst-fortify.c:1471:(.text+0x3ae0): warning: the `getwd' function is dangerous and should not be used.
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-1-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-2-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-3-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:401:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:518:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 7 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 2 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:793:3: warning: 'wcslcpy' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:801:3: warning: 'wcslcpy' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1062:7: warning: 'fgets' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1090:7: warning: 'fgets_unlocked' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1090 | if (fgets_unlocked (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../libio/bits/stdio2.h:342:1: note: in a call to function 'fgets_unlocked' declared with attribute 'access (write_only, 1, 2)'
342 | fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
| ^~~~~~~~~~~~~~
./tst-fortify.c:1187:7: warning: 'read' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ../sysdeps/unix/sysv/linux/bits/sigstksz.h:24,
from ../include/bits/sigstksz.h:4,
from ../signal/signal.h:328,
from ../include/signal.h:2,
from ./tst-fortify.c:31:
../posix/bits/unistd.h:26:1: note: in a call to function 'read' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:7: warning: 'pread' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:40:1: note: in a call to function 'pread' declared with attribute 'access (write_only, 2, 3)'
40 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:7: warning: 'pread64' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'pread64' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:7: warning: 'readlink' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'readlink' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../posix/bits/unistd.h:81:1: note: in expansion of macro '__NTH'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~
./tst-fortify.c:1411:7: warning: 'readlinkat' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'readlinkat' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1657:7: warning: 'wcstombs' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'wcstombs' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1699:11: warning: 'ptsname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1699 | if (ptsname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1698:12: note: destination object 'smallbuf' of size 2
1698 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:72:8: note: in a call to function 'ptsname_r' declared with attribute 'access (write_only, 2, 3)'
72 | __NTH (ptsname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1712:3: warning: 'confstr' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'confstr' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1738:11: warning: 'ttyname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'ttyname_r' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1750:3: warning: 'gethostname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'gethostname' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1759:3: warning: 'getlogin_r' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'getlogin_r' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:9: warning: 'getdomainname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'getdomainname' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1816:3: warning: 'poll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ^~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'poll' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:1827:3: warning: 'ppoll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1827 | ppoll (fds, 2, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
../include/bits/../../io/bits/poll2.h:95:1: note: in a call to function 'ppoll' declared with attribute 'access (write_only, 1, 2)'
95 | ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:401:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:518:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:793:3: warning: 'wcslcpy' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:801:3: warning: 'wcslcpy' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1062:7: warning: 'fgets' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1090:7: warning: 'fgets_unlocked' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1090 | if (fgets_unlocked (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../libio/bits/stdio2.h:342:1: note: in a call to function 'fgets_unlocked' declared with attribute 'access (write_only, 1, 2)'
342 | fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
| ^~~~~~~~~~~~~~
./tst-fortify.c:1187:7: warning: 'read' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ../sysdeps/unix/sysv/linux/bits/sigstksz.h:24,
from ../include/bits/sigstksz.h:4,
from ../signal/signal.h:328,
from ../include/signal.h:2,
from ./tst-fortify.c:31:
../posix/bits/unistd.h:26:1: note: in a call to function 'read' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:7: warning: 'pread' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:40:1: note: in a call to function 'pread' declared with attribute 'access (write_only, 2, 3)'
40 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:7: warning: 'pread64' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'pread64' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:7: warning: 'readlink' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'readlink' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../posix/bits/unistd.h:81:1: note: in expansion of macro '__NTH'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~
./tst-fortify.c:1411:7: warning: 'readlinkat' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'readlinkat' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1657:7: warning: 'wcstombs' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'wcstombs' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1699:11: warning: 'ptsname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1699 | if (ptsname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1698:12: note: destination object 'smallbuf' of size 2
1698 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:72:8: note: in a call to function 'ptsname_r' declared with attribute 'access (write_only, 2, 3)'
72 | __NTH (ptsname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1712:3: warning: 'confstr' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'confstr' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1738:11: warning: 'ttyname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'ttyname_r' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1750:3: warning: 'gethostname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'gethostname' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1759:3: warning: 'getlogin_r' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'getlogin_r' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:9: warning: 'getdomainname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'getdomainname' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1816:3: warning: 'poll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ^~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'poll' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:1827:3: warning: 'ppoll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1827 | ppoll (fds, 2, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
../include/bits/../../io/bits/poll2.h:95:1: note: in a call to function 'ppoll' declared with attribute 'access (write_only, 1, 2)'
95 | ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1723:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:401:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:518:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:401:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:518:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:417:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpncpy',
inlined from 'do_test' at ./tst-fortify.c:425:3:
../string/bits/string_fortified.h:111:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:417:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpncpy',
inlined from 'do_test' at ./tst-fortify.c:425:3:
../string/bits/string_fortified.h:111:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:351:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:359:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:367:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:376:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:385:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:393:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:409:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:413:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:493:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:351:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:359:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:367:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:376:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:385:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:393:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:409:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:413:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:493:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:437:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:731:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:739:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:747:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:756:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:765:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:781:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:789:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:805:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:809:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:849:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'fgets',
inlined from 'do_test' at ./tst-fortify.c:1062:7:
../libio/bits/stdio2.h:316:12: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fgets_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1090:7:
../libio/bits/stdio2.h:353:12: warning: call to '__fgets_unlocked_chk_warn' declared with attribute warning: fgets_unlocked called with bigger size than length of destination buffer [-Wattribute-warning]
353 | return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread',
inlined from 'do_test' at ./tst-fortify.c:1121:7:
../libio/bits/stdio2.h:334:12: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1160:7:
../libio/bits/stdio2.h:397:12: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'read',
inlined from 'do_test' at ./tst-fortify.c:1187:7:
../misc/sys/cdefs.h:337:9: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread',
inlined from 'do_test' at ./tst-fortify.c:1211:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread_chk_warn' declared with attribute warning: pread called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:46:10: note: in expansion of macro '__glibc_fortify'
46 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread64',
inlined from 'do_test' at ./tst-fortify.c:1237:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ptsname_r',
inlined from 'do_test' at ./tst-fortify.c:1699:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'ppoll',
inlined from 'do_test' at ./tst-fortify.c:1827:3:
../misc/sys/cdefs.h:337:9: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1848:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1852:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:437:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:731:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:739:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:747:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:756:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:765:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:781:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:789:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:805:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:809:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:849:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'fgets',
inlined from 'do_test' at ./tst-fortify.c:1062:7:
../libio/bits/stdio2.h:316:12: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fgets_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1090:7:
../libio/bits/stdio2.h:353:12: warning: call to '__fgets_unlocked_chk_warn' declared with attribute warning: fgets_unlocked called with bigger size than length of destination buffer [-Wattribute-warning]
353 | return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread',
inlined from 'do_test' at ./tst-fortify.c:1121:7:
../libio/bits/stdio2.h:334:12: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1160:7:
../libio/bits/stdio2.h:397:12: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'read',
inlined from 'do_test' at ./tst-fortify.c:1187:7:
../misc/sys/cdefs.h:337:9: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread',
inlined from 'do_test' at ./tst-fortify.c:1211:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread_chk_warn' declared with attribute warning: pread called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:46:10: note: in expansion of macro '__glibc_fortify'
46 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread64',
inlined from 'do_test' at ./tst-fortify.c:1237:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ptsname_r',
inlined from 'do_test' at ./tst-fortify.c:1699:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'ppoll',
inlined from 'do_test' at ./tst-fortify.c:1827:3:
../misc/sys/cdefs.h:337:9: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1848:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1852:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:493:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:849:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1034:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1036:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1041:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1263:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ptsname_r',
inlined from 'do_test' at ./tst-fortify.c:1699:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'ppoll',
inlined from 'do_test' at ./tst-fortify.c:1827:3:
../misc/sys/cdefs.h:337:9: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-1-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-2-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:401:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:518:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 7 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 2 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:793:3: warning: 'wcslcpy' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:801:3: warning: 'wcslcpy' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1062:7: warning: 'fgets' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1090:7: warning: 'fgets_unlocked' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1090 | if (fgets_unlocked (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../libio/bits/stdio2.h:342:1: note: in a call to function 'fgets_unlocked' declared with attribute 'access (write_only, 1, 2)'
342 | fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
| ^~~~~~~~~~~~~~
./tst-fortify.c:1187:7: warning: 'read' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ../sysdeps/unix/sysv/linux/bits/sigstksz.h:24,
from ../include/bits/sigstksz.h:4,
from ../signal/signal.h:328,
from ../include/signal.h:2,
from ./tst-fortify.c:31:
../posix/bits/unistd.h:26:1: note: in a call to function 'read' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:7: warning: 'pread' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:52:1: note: in a call to function 'pread' declared with attribute 'access (write_only, 2, 3)'
52 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:7: warning: 'pread64' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'pread64' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:7: warning: 'readlink' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'readlink' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../posix/bits/unistd.h:81:1: note: in expansion of macro '__NTH'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~
./tst-fortify.c:1411:7: warning: 'readlinkat' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'readlinkat' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1657:7: warning: 'wcstombs' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'wcstombs' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1699:11: warning: 'ptsname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1699 | if (ptsname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1698:12: note: destination object 'smallbuf' of size 2
1698 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:72:8: note: in a call to function 'ptsname_r' declared with attribute 'access (write_only, 2, 3)'
72 | __NTH (ptsname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1712:3: warning: 'confstr' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'confstr' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1738:11: warning: 'ttyname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'ttyname_r' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1750:3: warning: 'gethostname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'gethostname' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1759:3: warning: 'getlogin_r' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'getlogin_r' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:9: warning: 'getdomainname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'getdomainname' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1816:3: warning: 'poll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ^~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'poll' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:1827:3: warning: 'ppoll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1827 | ppoll (fds, 2, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
../include/bits/../../io/bits/poll2.h:95:1: note: in a call to function 'ppoll' declared with attribute 'access (write_only, 1, 2)'
95 | ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~~
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:401:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:518:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:793:3: warning: 'wcslcpy' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:801:3: warning: 'wcslcpy' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1062:7: warning: 'fgets' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1090:7: warning: 'fgets_unlocked' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1090 | if (fgets_unlocked (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../libio/bits/stdio2.h:342:1: note: in a call to function 'fgets_unlocked' declared with attribute 'access (write_only, 1, 2)'
342 | fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
| ^~~~~~~~~~~~~~
./tst-fortify.c:1187:7: warning: 'read' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-3-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ../sysdeps/unix/sysv/linux/bits/sigstksz.h:24,
from ../include/bits/sigstksz.h:4,
from ../signal/signal.h:328,
from ../include/signal.h:2,
from ./tst-fortify.c:31:
../posix/bits/unistd.h:26:1: note: in a call to function 'read' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c:1211:7: warning: 'pread' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:52:1: note: in a call to function 'pread' declared with attribute 'access (write_only, 2, 3)'
52 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:7: warning: 'pread64' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'pread64' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:7: warning: 'readlink' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'readlink' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../posix/bits/unistd.h:81:1: note: in expansion of macro '__NTH'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~
./tst-fortify.c:1411:7: warning: 'readlinkat' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'readlinkat' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1657:7: warning: 'wcstombs' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'wcstombs' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1699:11: warning: 'ptsname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1699 | if (ptsname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1698:12: note: destination object 'smallbuf' of size 2
1698 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:72:8: note: in a call to function 'ptsname_r' declared with attribute 'access (write_only, 2, 3)'
72 | __NTH (ptsname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1712:3: warning: 'confstr' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'confstr' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1738:11: warning: 'ttyname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'ttyname_r' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1750:3: warning: 'gethostname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'gethostname' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1759:3: warning: 'getlogin_r' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'getlogin_r' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:9: warning: 'getdomainname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'getdomainname' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1816:3: warning: 'poll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ^~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'poll' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:1827:3: warning: 'ppoll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1827 | ppoll (fds, 2, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
../include/bits/../../io/bits/poll2.h:95:1: note: in a call to function 'ppoll' declared with attribute 'access (write_only, 1, 2)'
95 | ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~~
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1723:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-1-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:401:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:518:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:401:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:518:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 7 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 2 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:793:3: warning: 'wcslcpy' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:801:3: warning: 'wcslcpy' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1062:7: warning: 'fgets' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1187:7: warning: 'read' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ./tst-fortify.c:35:
../posix/bits/unistd.h:26:1: note: in a call to function 'read' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:7: warning: 'pread' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:40:1: note: in a call to function 'pread' declared with attribute 'access (write_only, 2, 3)'
40 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:7: warning: 'pread64' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'pread64' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:7: warning: 'readlink' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'readlink' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../posix/bits/unistd.h:81:1: note: in expansion of macro '__NTH'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~
./tst-fortify.c:1411:7: warning: 'readlinkat' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'readlinkat' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1657:7: warning: 'wcstombs' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'wcstombs' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1712:3: warning: 'confstr' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'confstr' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1738:11: warning: 'ttyname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'ttyname_r' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1750:3: warning: 'gethostname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'gethostname' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1759:3: warning: 'getlogin_r' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'getlogin_r' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:9: warning: 'getdomainname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'getdomainname' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1816:3: warning: 'poll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ^~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'poll' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:401:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:518:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:401:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:518:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-2-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:417:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpncpy',
inlined from 'do_test' at ./tst-fortify.c:425:3:
../string/bits/string_fortified.h:111:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:401:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:518:3: warning: 'explicit_bzero' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'explicit_bzero' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:793:3: warning: 'wcslcpy' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:801:3: warning: 'wcslcpy' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'wcslcpy' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1062:7: warning: 'fgets' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1187:7: warning: 'read' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ./tst-fortify.c:35:
../posix/bits/unistd.h:26:1: note: in a call to function 'read' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:7: warning: 'pread' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:40:1: note: in a call to function 'pread' declared with attribute 'access (write_only, 2, 3)'
40 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:7: warning: 'pread64' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'pread64' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:7: warning: 'readlink' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'readlink' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../posix/bits/unistd.h:81:1: note: in expansion of macro '__NTH'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~
./tst-fortify.c:1411:7: warning: 'readlinkat' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'readlinkat' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1657:7: warning: 'wcstombs' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'wcstombs' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1712:3: warning: 'confstr' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'confstr' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1738:11: warning: 'ttyname_r' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'ttyname_r' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1750:3: warning: 'gethostname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'gethostname' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1759:3: warning: 'getlogin_r' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'getlogin_r' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:9: warning: 'getdomainname' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'getdomainname' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1816:3: warning: 'poll' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ^~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'poll' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:351:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:359:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:367:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:376:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:385:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:393:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:409:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:413:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:493:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:417:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpncpy',
inlined from 'do_test' at ./tst-fortify.c:425:3:
../string/bits/string_fortified.h:111:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:437:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:731:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:739:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:747:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:756:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:765:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:781:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:789:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:805:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:809:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:849:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'fgets',
inlined from 'do_test' at ./tst-fortify.c:1062:7:
../libio/bits/stdio2.h:316:12: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fgets_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1090:7:
../libio/bits/stdio2.h:353:12: warning: call to '__fgets_unlocked_chk_warn' declared with attribute warning: fgets_unlocked called with bigger size than length of destination buffer [-Wattribute-warning]
353 | return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread',
inlined from 'do_test' at ./tst-fortify.c:1121:7:
../libio/bits/stdio2.h:334:12: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1160:7:
../libio/bits/stdio2.h:397:12: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'read',
inlined from 'do_test' at ./tst-fortify.c:1187:7:
../misc/sys/cdefs.h:337:9: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread',
inlined from 'do_test' at ./tst-fortify.c:1211:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:58:10: note: in expansion of macro '__glibc_fortify'
58 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread64',
inlined from 'do_test' at ./tst-fortify.c:1237:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ptsname_r',
inlined from 'do_test' at ./tst-fortify.c:1699:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'ppoll',
inlined from 'do_test' at ./tst-fortify.c:1827:3:
../misc/sys/cdefs.h:337:9: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1848:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1852:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:351:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:359:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:367:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:376:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:385:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:393:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:409:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:413:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:493:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:437:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:731:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:739:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:747:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:756:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:765:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:781:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:789:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:805:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:809:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:849:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'fgets',
inlined from 'do_test' at ./tst-fortify.c:1062:7:
../libio/bits/stdio2.h:316:12: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fgets_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1090:7:
../libio/bits/stdio2.h:353:12: warning: call to '__fgets_unlocked_chk_warn' declared with attribute warning: fgets_unlocked called with bigger size than length of destination buffer [-Wattribute-warning]
353 | return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread',
inlined from 'do_test' at ./tst-fortify.c:1121:7:
../libio/bits/stdio2.h:334:12: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1160:7:
../libio/bits/stdio2.h:397:12: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'read',
inlined from 'do_test' at ./tst-fortify.c:1187:7:
../misc/sys/cdefs.h:337:9: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread',
inlined from 'do_test' at ./tst-fortify.c:1211:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:58:10: note: in expansion of macro '__glibc_fortify'
58 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread64',
inlined from 'do_test' at ./tst-fortify.c:1237:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ptsname_r',
inlined from 'do_test' at ./tst-fortify.c:1699:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'ppoll',
inlined from 'do_test' at ./tst-fortify.c:1827:3:
../misc/sys/cdefs.h:337:9: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1848:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1852:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:417:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpncpy',
inlined from 'do_test' at ./tst-fortify.c:425:3:
../string/bits/string_fortified.h:111:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:351:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:359:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:367:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:385:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:393:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:409:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:413:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:437:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:731:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:739:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:747:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:765:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:781:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:789:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:805:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:809:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'fgets',
inlined from 'do_test' at ./tst-fortify.c:1062:7:
../libio/bits/stdio2.h:316:12: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread',
inlined from 'do_test' at ./tst-fortify.c:1121:7:
../libio/bits/stdio2.h:334:12: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1160:7:
../libio/bits/stdio2.h:397:12: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'read',
inlined from 'do_test' at ./tst-fortify.c:1187:7:
../misc/sys/cdefs.h:337:9: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread',
inlined from 'do_test' at ./tst-fortify.c:1211:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread_chk_warn' declared with attribute warning: pread called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:46:10: note: in expansion of macro '__glibc_fortify'
46 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread64',
inlined from 'do_test' at ./tst-fortify.c:1237:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1848:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1852:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:401:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'explicit_bzero',
inlined from 'do_test' at ./tst-fortify.c:518:3:
../string/bits/string_fortified.h:72:3: warning: '__explicit_bzero_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function '__explicit_bzero_chk' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'mempcpy',
inlined from 'do_test' at ./tst-fortify.c:493:16:
../string/bits/string_fortified.h:45:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmempcpy',
inlined from 'do_test' at ./tst-fortify.c:849:8:
../misc/sys/cdefs.h:354:9: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1034:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1036:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1041:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1263:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ptsname_r',
inlined from 'do_test' at ./tst-fortify.c:1699:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'ppoll',
inlined from 'do_test' at ./tst-fortify.c:1827:3:
../misc/sys/cdefs.h:337:9: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:417:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpncpy',
inlined from 'do_test' at ./tst-fortify.c:425:3:
../string/bits/string_fortified.h:111:10: warning: '__builtin___strncpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:351:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:359:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:367:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:385:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:393:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:409:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:413:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char[10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:437:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:731:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:739:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:747:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:765:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:781:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:789:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:805:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcpncpy',
inlined from 'do_test' at ./tst-fortify.c:809:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'fgets',
inlined from 'do_test' at ./tst-fortify.c:1062:7:
../libio/bits/stdio2.h:316:12: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread',
inlined from 'do_test' at ./tst-fortify.c:1121:7:
../libio/bits/stdio2.h:334:12: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'fread_unlocked',
inlined from 'do_test' at ./tst-fortify.c:1160:7:
../libio/bits/stdio2.h:397:12: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'read',
inlined from 'do_test' at ./tst-fortify.c:1187:7:
../misc/sys/cdefs.h:337:9: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread',
inlined from 'do_test' at ./tst-fortify.c:1211:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread_chk_warn' declared with attribute warning: pread called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:46:10: note: in expansion of macro '__glibc_fortify'
46 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'pread64',
inlined from 'do_test' at ./tst-fortify.c:1237:7:
../misc/sys/cdefs.h:337:9: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-3-def.c:3:
./tst-fortify.c: In function 'do_test':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1848:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_ntop',
inlined from 'do_test' at ./tst-fortify.c:1852:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
./tst-fortify.c: At top level:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:548:3: warning: 'strlcpy' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:161:8: note: in a call to function 'strlcpy' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:585:3: warning: 'strlcat' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'strlcat' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
./tst-fortify.c:1723:9: warning: 'getgroups' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1723:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
../posix/bits/unistd.h:146:8: note: in a call to function 'getgroups'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro '__NTH'
81 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
| ^~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-1-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:401:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:518:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 7 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 2 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:793:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:801:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1062:13: warning: 'char* fgets(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1090:22: warning: 'char* fgets_unlocked(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1090 | if (fgets_unlocked (buf, buf_size + 1, stdin) != buf)
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../libio/bits/stdio2.h:342:1: note: in a call to function 'char* fgets_unlocked(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
342 | fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
| ^~~~~~~~~~~~~~
./tst-fortify.c:1187:12: warning: 'ssize_t read(int, void*, size_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ../sysdeps/unix/sysv/linux/bits/sigstksz.h:24,
from ../include/bits/sigstksz.h:4,
from ../signal/signal.h:328,
from ../include/signal.h:2,
from ./tst-fortify.c:31:
../posix/bits/unistd.h:26:1: note: in a call to function 'ssize_t read(int, void*, size_t)' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:13: warning: 'ssize_t pread(int, void*, size_t, __off_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:40:1: note: in a call to function 'ssize_t pread(int, void*, size_t, __off_t)' declared with attribute 'access (write_only, 2, 3)'
40 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:15: warning: 'ssize_t pread64(int, void*, size_t, __off64_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'ssize_t pread64(int, void*, size_t, __off64_t)' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:16: warning: 'ssize_t readlink(const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'ssize_t readlink(const char*, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1411:18: warning: 'ssize_t readlinkat(int, const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'ssize_t readlinkat(int, const char*, char*, size_t)' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1657:16: warning: 'size_t wcstombs(char*, const wchar_t*, size_t)' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'size_t wcstombs(char*, const wchar_t*, size_t)' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1699:21: warning: 'int ptsname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1699 | if (ptsname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1698:12: note: destination object 'smallbuf' of size 2
1698 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:72:8: note: in a call to function 'int ptsname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
72 | __NTH (ptsname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1712:11: warning: 'size_t confstr(int, char*, size_t)' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'size_t confstr(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1723:19: warning: 'int getgroups(int, __gid_t*)' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'int getgroups(int, __gid_t*)' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1738:21: warning: 'int ttyname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'int ttyname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1750:15: warning: 'int gethostname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'int gethostname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1759:14: warning: 'int getlogin_r(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'int getlogin_r(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:23: warning: 'int getdomainname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'int getdomainname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1816:8: warning: 'int poll(pollfd*, nfds_t, int)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ~~~~~^~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'int poll(pollfd*, nfds_t, int)' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:1827:9: warning: 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1827 | ppoll (fds, 2, NULL, NULL);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
../include/bits/../../io/bits/poll2.h:95:1: note: in a call to function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)' declared with attribute 'access (write_only, 1, 2)'
95 | ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: '__getgroups_chk_warn' accessing 4 bytes in a region of size 1 [-Wstringop-overflow=]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../misc/sys/cdefs.h:337:9: note: referencing argument 2 of type '__gid_t[0]' {aka 'unsigned int[]'}
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
../posix/bits/unistd-decl.h: In function 'do_test':
../posix/bits/unistd-decl.h:137:28: note: in a call to function '__getgroups_chk_warn'
137 | extern int __REDIRECT_NTH (__getgroups_chk_warn,
| ^~~~~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:418:6: note: in definition of macro '__REDIRECT_NTH'
418 | name proto __asm__ (__ASMNAME (#alias)) __THROW
| ^~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-2-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:401:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:518:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:793:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:801:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1062:13: warning: 'char* fgets(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1090:22: warning: 'char* fgets_unlocked(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1090 | if (fgets_unlocked (buf, buf_size + 1, stdin) != buf)
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../libio/bits/stdio2.h:342:1: note: in a call to function 'char* fgets_unlocked(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
342 | fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
| ^~~~~~~~~~~~~~
./tst-fortify.c:1187:12: warning: 'ssize_t read(int, void*, size_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ../sysdeps/unix/sysv/linux/bits/sigstksz.h:24,
from ../include/bits/sigstksz.h:4,
from ../signal/signal.h:328,
from ../include/signal.h:2,
from ./tst-fortify.c:31:
../posix/bits/unistd.h:26:1: note: in a call to function 'ssize_t read(int, void*, size_t)' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:13: warning: 'ssize_t pread(int, void*, size_t, __off_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:40:1: note: in a call to function 'ssize_t pread(int, void*, size_t, __off_t)' declared with attribute 'access (write_only, 2, 3)'
40 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:15: warning: 'ssize_t pread64(int, void*, size_t, __off64_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'ssize_t pread64(int, void*, size_t, __off64_t)' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:16: warning: 'ssize_t readlink(const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'ssize_t readlink(const char*, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1411:18: warning: 'ssize_t readlinkat(int, const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'ssize_t readlinkat(int, const char*, char*, size_t)' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1657:16: warning: 'size_t wcstombs(char*, const wchar_t*, size_t)' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'size_t wcstombs(char*, const wchar_t*, size_t)' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1699:21: warning: 'int ptsname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1699 | if (ptsname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1698:12: note: destination object 'smallbuf' of size 2
1698 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:72:8: note: in a call to function 'int ptsname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
72 | __NTH (ptsname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1712:11: warning: 'size_t confstr(int, char*, size_t)' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'size_t confstr(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1723:19: warning: 'int getgroups(int, __gid_t*)' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'int getgroups(int, __gid_t*)' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1738:21: warning: 'int ttyname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'int ttyname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1750:15: warning: 'int gethostname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'int gethostname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1759:14: warning: 'int getlogin_r(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'int getlogin_r(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:23: warning: 'int getdomainname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'int getdomainname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1816:8: warning: 'int poll(pollfd*, nfds_t, int)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ~~~~~^~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'int poll(pollfd*, nfds_t, int)' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:1827:9: warning: 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1827 | ppoll (fds, 2, NULL, NULL);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
../include/bits/../../io/bits/poll2.h:95:1: note: in a call to function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)' declared with attribute 'access (write_only, 1, 2)'
95 | ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~~
./tst-fortify.c:459:3: warning: '__builtin___strncat_chk' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:401:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:518:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'memcpy',
inlined from 'do_test' at ./tst-fortify.c:468:3:
../string/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memmove',
inlined from 'do_test' at ./tst-fortify.c:476:3:
../string/bits/string_fortified.h:36:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'bcopy',
inlined from 'do_test' at ./tst-fortify.c:484:3:
../string/bits/strings_fortified.h:25:10: warning: '__builtin___memmove_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'memset',
inlined from 'do_test' at ./tst-fortify.c:502:3:
../string/bits/string_fortified.h:59:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'bzero',
inlined from 'do_test' at ./tst-fortify.c:510:3:
../string/bits/strings_fortified.h:32:10: warning: '__builtin___memset_chk' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'struct A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'do_test':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'strcpy',
inlined from 'do_test' at ./tst-fortify.c:532:3:
../string/bits/string_fortified.h:81:10: warning: '__builtin___memcpy_chk' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'stpcpy',
inlined from 'do_test' at ./tst-fortify.c:536:7:
../string/bits/string_fortified.h:90:10: warning: '__builtin___memcpy_chk' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'do_test' at ./tst-fortify.c:540:3:
../string/bits/string_fortified.h:100:10: warning: '__builtin___strncpy_chk' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
In function 'snprintf',
inlined from 'do_test' at ./tst-fortify.c:566:3:
../libio/bits/stdio2.h:68:10: warning: '__builtin___snprintf_chk' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wmemcpy',
inlined from 'do_test' at ./tst-fortify.c:832:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemmove',
inlined from 'do_test' at ./tst-fortify.c:840:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wmemset',
inlined from 'do_test' at ./tst-fortify.c:858:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsncpy',
inlined from 'do_test' at ./tst-fortify.c:880:3:
../misc/sys/cdefs.h:354:9: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1034:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1036:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1041:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In function 'gets',
inlined from 'do_test' at ./tst-fortify.c:1263:7:
../libio/bits/stdio2.h:299:10: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ^~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'recv',
inlined from 'do_test' at ./tst-fortify.c:1312:11:
../socket/bits/socket2.h:45:12: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'recvfrom',
inlined from 'do_test' at ./tst-fortify.c:1343:11:
../socket/bits/socket2.h:79:12: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'readlink',
inlined from 'do_test' at ./tst-fortify.c:1386:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'readlinkat',
inlined from 'do_test' at ./tst-fortify.c:1411:7:
../misc/sys/cdefs.h:337:9: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getcwd',
inlined from 'do_test' at ./tst-fortify.c:1465:8:
../misc/sys/cdefs.h:337:9: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'realpath',
inlined from 'do_test' at ./tst-fortify.c:1512:13:
../stdlib/bits/stdlib.h:53:12: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'mbsrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1576:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbstowcs',
inlined from 'do_test' at ./tst-fortify.c:1599:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'mbsnrtowcs',
inlined from 'do_test' at ./tst-fortify.c:1619:7:
../misc/sys/cdefs.h:354:9: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wcsrtombs',
inlined from 'do_test' at ./tst-fortify.c:1638:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcstombs',
inlined from 'do_test' at ./tst-fortify.c:1657:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'wcsnrtombs',
inlined from 'do_test' at ./tst-fortify.c:1676:7:
../misc/sys/cdefs.h:337:9: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'confstr',
inlined from 'do_test' at ./tst-fortify.c:1712:3:
../misc/sys/cdefs.h:337:9: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getgroups',
inlined from 'do_test' at ./tst-fortify.c:1723:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'ttyname_r',
inlined from 'do_test' at ./tst-fortify.c:1738:11:
../misc/sys/cdefs.h:337:9: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'gethostname',
inlined from 'do_test' at ./tst-fortify.c:1750:3:
../misc/sys/cdefs.h:337:9: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getlogin_r',
inlined from 'do_test' at ./tst-fortify.c:1759:3:
../misc/sys/cdefs.h:337:9: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'getdomainname',
inlined from 'do_test' at ./tst-fortify.c:1769:9:
../misc/sys/cdefs.h:337:9: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'do_test':
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:12: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ^~~~~~~~~~~~~~~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'poll',
inlined from 'do_test' at ./tst-fortify.c:1816:3:
../misc/sys/cdefs.h:337:9: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1868:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1872:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'inet_pton',
inlined from 'do_test' at ./tst-fortify.c:1876:3:
../misc/sys/cdefs.h:337:9: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:401:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:518:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In file included from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-3-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:1172:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1172 | if (read (fileno (stdin), buf, buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1175:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1175 | if (read (fileno (stdin), buf, buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1181:53: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1181 | if (read (fileno (stdin), buf, l0 + buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1187:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1192:53: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1192 | if (read (fileno (stdin), buf, l0 + buf_size + 1) != buf_size + 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1198:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1197 | if (pread (fileno (stdin), buf, buf_size - 1, buf_size - 2)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1198 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1201:52: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1201 | if (pread (fileno (stdin), buf, buf_size - 1, 0) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1205:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1204 | if (pread (fileno (stdin), buf, l0 + buf_size - 1, buf_size - 3)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1205 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1212:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1212 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1218:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1217 | if (pread (fileno (stdin), buf, l0 + buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1218 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1224:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1223 | if (pread64 (fileno (stdin), buf, buf_size - 1, buf_size - 2)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1224 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1227:54: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1227 | if (pread64 (fileno (stdin), buf, buf_size - 1, 0) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1231:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1230 | if (pread64 (fileno (stdin), buf, l0 + buf_size - 1, buf_size - 3)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1231 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1238:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1238 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1244:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1243 | if (pread64 (fileno (stdin), buf, l0 + buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1244 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26:
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:417:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:425:11:
../string/bits/string_fortified.h:111:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-1-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:351:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:359:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:367:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:376:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:385:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:393:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:409:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:413:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:493:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:401:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:518:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 7 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 2 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:793:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:801:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1062:13: warning: 'char* fgets(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1090:22: warning: 'char* fgets_unlocked(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1090 | if (fgets_unlocked (buf, buf_size + 1, stdin) != buf)
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../libio/bits/stdio2.h:342:1: note: in a call to function 'char* fgets_unlocked(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
342 | fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
| ^~~~~~~~~~~~~~
./tst-fortify.c:1187:12: warning: 'ssize_t read(int, void*, size_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ../sysdeps/unix/sysv/linux/bits/sigstksz.h:24,
from ../include/bits/sigstksz.h:4,
from ../signal/signal.h:328,
from ../include/signal.h:2,
from ./tst-fortify.c:31:
../posix/bits/unistd.h:26:1: note: in a call to function 'ssize_t read(int, void*, size_t)' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:13: warning: 'ssize_t pread(int, void*, size_t, __off64_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:52:1: note: in a call to function 'ssize_t pread(int, void*, size_t, __off64_t)' declared with attribute 'access (write_only, 2, 3)'
52 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:15: warning: 'ssize_t pread64(int, void*, size_t, __off64_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'ssize_t pread64(int, void*, size_t, __off64_t)' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:16: warning: 'ssize_t readlink(const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'ssize_t readlink(const char*, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1411:18: warning: 'ssize_t readlinkat(int, const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'ssize_t readlinkat(int, const char*, char*, size_t)' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1657:16: warning: 'size_t wcstombs(char*, const wchar_t*, size_t)' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'size_t wcstombs(char*, const wchar_t*, size_t)' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1699:21: warning: 'int ptsname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1699 | if (ptsname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1698:12: note: destination object 'smallbuf' of size 2
1698 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:72:8: note: in a call to function 'int ptsname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
72 | __NTH (ptsname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1712:11: warning: 'size_t confstr(int, char*, size_t)' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'size_t confstr(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1723:19: warning: 'int getgroups(int, __gid_t*)' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'int getgroups(int, __gid_t*)' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1738:21: warning: 'int ttyname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'int ttyname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1750:15: warning: 'int gethostname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'int gethostname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1759:14: warning: 'int getlogin_r(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'int getlogin_r(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:23: warning: 'int getdomainname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'int getdomainname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1816:8: warning: 'int poll(pollfd*, nfds_t, int)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ~~~~~^~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'int poll(pollfd*, nfds_t, int)' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:1827:9: warning: 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1827 | ppoll (fds, 2, NULL, NULL);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
../include/bits/../../io/bits/poll2.h:95:1: note: in a call to function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)' declared with attribute 'access (write_only, 1, 2)'
95 | ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~~
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:437:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:731:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:739:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:747:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:756:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:765:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:781:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:789:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:805:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:809:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:849:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* fgets(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1062:13:
../libio/bits/stdio2.h:316:29: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* fgets_unlocked(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1090:22:
../libio/bits/stdio2.h:353:38: warning: call to '__fgets_unlocked_chk_warn' declared with attribute warning: fgets_unlocked called with bigger size than length of destination buffer [-Wattribute-warning]
353 | return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1121:13:
../libio/bits/stdio2.h:334:29: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread_unlocked(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1160:22:
../libio/bits/stdio2.h:397:38: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t read(int, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1187:12:
../misc/sys/cdefs.h:337:30: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread(int, void*, size_t, __off_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1211:13:
../misc/sys/cdefs.h:337:30: warning: call to '__pread_chk_warn' declared with attribute warning: pread called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:46:10: note: in expansion of macro '__glibc_fortify'
46 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread64(int, void*, size_t, __off64_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1237:15:
../misc/sys/cdefs.h:337:30: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int ptsname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1699:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1827:9:
../misc/sys/cdefs.h:337:30: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1848:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1852:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:417:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:425:11:
../string/bits/string_fortified.h:111:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:351:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:359:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:367:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:376:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:385:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:393:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:409:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:413:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:493:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:437:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:731:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:739:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:747:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:756:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:765:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:781:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:789:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:805:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:809:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:849:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* fgets(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1062:13:
../libio/bits/stdio2.h:316:29: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* fgets_unlocked(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1090:22:
../libio/bits/stdio2.h:353:38: warning: call to '__fgets_unlocked_chk_warn' declared with attribute warning: fgets_unlocked called with bigger size than length of destination buffer [-Wattribute-warning]
353 | return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1121:13:
../libio/bits/stdio2.h:334:29: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread_unlocked(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1160:22:
../libio/bits/stdio2.h:397:38: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t read(int, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1187:12:
../misc/sys/cdefs.h:337:30: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread(int, void*, size_t, __off_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1211:13:
../misc/sys/cdefs.h:337:30: warning: call to '__pread_chk_warn' declared with attribute warning: pread called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:46:10: note: in expansion of macro '__glibc_fortify'
46 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread64(int, void*, size_t, __off64_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1237:15:
../misc/sys/cdefs.h:337:30: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int ptsname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1699:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1827:9:
../misc/sys/cdefs.h:337:30: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1848:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1852:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:401:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:518:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:417:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:425:11:
../string/bits/string_fortified.h:111:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:351:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:359:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:367:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:376:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:385:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:393:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:409:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:413:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:493:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:437:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:731:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:739:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:747:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:756:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:765:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:781:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:789:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:805:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:809:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:849:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* fgets(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1062:13:
../libio/bits/stdio2.h:316:29: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* fgets_unlocked(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1090:22:
../libio/bits/stdio2.h:353:38: warning: call to '__fgets_unlocked_chk_warn' declared with attribute warning: fgets_unlocked called with bigger size than length of destination buffer [-Wattribute-warning]
353 | return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1121:13:
../libio/bits/stdio2.h:334:29: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread_unlocked(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1160:22:
../libio/bits/stdio2.h:397:38: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t read(int, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1187:12:
../misc/sys/cdefs.h:337:30: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread(int, void*, size_t, __off64_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1211:13:
../misc/sys/cdefs.h:337:30: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:58:10: note: in expansion of macro '__glibc_fortify'
58 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread64(int, void*, size_t, __off64_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1237:15:
../misc/sys/cdefs.h:337:30: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int ptsname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1699:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1827:9:
../misc/sys/cdefs.h:337:30: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1848:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1852:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-2-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:401:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:518:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:793:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:801:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1062:13: warning: 'char* fgets(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1090:22: warning: 'char* fgets_unlocked(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1090 | if (fgets_unlocked (buf, buf_size + 1, stdin) != buf)
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../libio/bits/stdio2.h:342:1: note: in a call to function 'char* fgets_unlocked(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
342 | fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
| ^~~~~~~~~~~~~~
./tst-fortify.c:1187:12: warning: 'ssize_t read(int, void*, size_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ../sysdeps/unix/sysv/linux/bits/sigstksz.h:24,
from ../include/bits/sigstksz.h:4,
from ../signal/signal.h:328,
from ../include/signal.h:2,
from ./tst-fortify.c:31:
../posix/bits/unistd.h:26:1: note: in a call to function 'ssize_t read(int, void*, size_t)' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:13: warning: 'ssize_t pread(int, void*, size_t, __off64_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:52:1: note: in a call to function 'ssize_t pread(int, void*, size_t, __off64_t)' declared with attribute 'access (write_only, 2, 3)'
52 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:15: warning: 'ssize_t pread64(int, void*, size_t, __off64_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'ssize_t pread64(int, void*, size_t, __off64_t)' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:16: warning: 'ssize_t readlink(const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'ssize_t readlink(const char*, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1411:18: warning: 'ssize_t readlinkat(int, const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'ssize_t readlinkat(int, const char*, char*, size_t)' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1657:16: warning: 'size_t wcstombs(char*, const wchar_t*, size_t)' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'size_t wcstombs(char*, const wchar_t*, size_t)' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1699:21: warning: 'int ptsname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1699 | if (ptsname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1698:12: note: destination object 'smallbuf' of size 2
1698 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:72:8: note: in a call to function 'int ptsname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
72 | __NTH (ptsname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1712:11: warning: 'size_t confstr(int, char*, size_t)' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'size_t confstr(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1723:19: warning: 'int getgroups(int, __gid_t*)' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'int getgroups(int, __gid_t*)' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1738:21: warning: 'int ttyname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'int ttyname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1750:15: warning: 'int gethostname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'int gethostname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1759:14: warning: 'int getlogin_r(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'int getlogin_r(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:23: warning: 'int getdomainname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'int getdomainname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1816:8: warning: 'int poll(pollfd*, nfds_t, int)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ~~~~~^~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'int poll(pollfd*, nfds_t, int)' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:1827:9: warning: 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1827 | ppoll (fds, 2, NULL, NULL);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
../include/bits/../../io/bits/poll2.h:95:1: note: in a call to function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)' declared with attribute 'access (write_only, 1, 2)'
95 | ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~~
In file included from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-3-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:1172:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1172 | if (read (fileno (stdin), buf, buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1175:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1175 | if (read (fileno (stdin), buf, buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1181:53: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1181 | if (read (fileno (stdin), buf, l0 + buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1187:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1192:53: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1192 | if (read (fileno (stdin), buf, l0 + buf_size + 1) != buf_size + 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1198:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1197 | if (pread (fileno (stdin), buf, buf_size - 1, buf_size - 2)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1198 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1201:52: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1201 | if (pread (fileno (stdin), buf, buf_size - 1, 0) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1205:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1204 | if (pread (fileno (stdin), buf, l0 + buf_size - 1, buf_size - 3)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1205 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1212:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1212 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1218:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1217 | if (pread (fileno (stdin), buf, l0 + buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1218 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1224:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1223 | if (pread64 (fileno (stdin), buf, buf_size - 1, buf_size - 2)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1224 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1227:54: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1227 | if (pread64 (fileno (stdin), buf, buf_size - 1, 0) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1231:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1230 | if (pread64 (fileno (stdin), buf, l0 + buf_size - 1, buf_size - 3)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1231 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1238:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1238 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1244:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1243 | if (pread64 (fileno (stdin), buf, l0 + buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1244 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26:
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:493:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:849:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1034:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1036:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1041:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1263:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int ptsname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1699:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1827:9:
../misc/sys/cdefs.h:337:30: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:401:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:518:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-1-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:401:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:518:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 7 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 2 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:793:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:801:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1062:13: warning: 'char* fgets(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1187:12: warning: 'ssize_t read(int, void*, size_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ./tst-fortify.c:35:
../posix/bits/unistd.h:26:1: note: in a call to function 'ssize_t read(int, void*, size_t)' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:13: warning: 'ssize_t pread(int, void*, size_t, __off_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:40:1: note: in a call to function 'ssize_t pread(int, void*, size_t, __off_t)' declared with attribute 'access (write_only, 2, 3)'
40 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:15: warning: 'ssize_t pread64(int, void*, size_t, __off64_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'ssize_t pread64(int, void*, size_t, __off64_t)' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
./tst-fortify.c:1386:16: warning: 'ssize_t readlink(const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'ssize_t readlink(const char*, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1411:18: warning: 'ssize_t readlinkat(int, const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'ssize_t readlinkat(int, const char*, char*, size_t)' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1657:16: warning: 'size_t wcstombs(char*, const wchar_t*, size_t)' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'size_t wcstombs(char*, const wchar_t*, size_t)' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1712:11: warning: 'size_t confstr(int, char*, size_t)' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'size_t confstr(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1723:19: warning: 'int getgroups(int, __gid_t*)' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'int getgroups(int, __gid_t*)' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1738:21: warning: 'int ttyname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'int ttyname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1750:15: warning: 'int gethostname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'int gethostname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1759:14: warning: 'int getlogin_r(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'int getlogin_r(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:23: warning: 'int getdomainname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'int getdomainname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1816:8: warning: 'int poll(pollfd*, nfds_t, int)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ~~~~~^~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'int poll(pollfd*, nfds_t, int)' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:417:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:425:11:
../string/bits/string_fortified.h:111:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:351:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:359:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:367:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:376:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:385:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:393:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:409:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:413:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:493:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26,
from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-2-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:437:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:731:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:739:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:747:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:756:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:765:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:781:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:789:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:805:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:809:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:849:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* fgets(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1062:13:
../libio/bits/stdio2.h:316:29: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* fgets_unlocked(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1090:22:
../libio/bits/stdio2.h:353:38: warning: call to '__fgets_unlocked_chk_warn' declared with attribute warning: fgets_unlocked called with bigger size than length of destination buffer [-Wattribute-warning]
353 | return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1121:13:
../libio/bits/stdio2.h:334:29: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread_unlocked(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1160:22:
../libio/bits/stdio2.h:397:38: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t read(int, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1187:12:
../misc/sys/cdefs.h:337:30: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread(int, void*, size_t, __off64_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1211:13:
../misc/sys/cdefs.h:337:30: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:58:10: note: in expansion of macro '__glibc_fortify'
58 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread64(int, void*, size_t, __off64_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1237:15:
../misc/sys/cdefs.h:337:30: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int ptsname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1699:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1827:9:
../misc/sys/cdefs.h:337:30: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1848:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1852:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:401:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
401 | explicit_bzero (buf + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:518:18: warning: 'void explicit_bzero(void*, size_t)' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
518 | explicit_bzero (a.buf1 + 9, 2);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 9 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:70:8: note: in a call to function 'void explicit_bzero(void*, size_t)' declared with attribute 'access (write_only, 1, 2)'
70 | __NTH (explicit_bzero (void *__dest, size_t __len))
| ^~~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:793:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
793 | wcslcpy (wbuf + 7, L"X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 28 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:801:11: warning: 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=]
801 | wcslcpy (wbuf + 9, L"XABCDEFGH", 8);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:112:9: note: at offset 36 into destination object 'wbuf' of size 40
112 | wchar_t wbuf[10];
| ^~~~
../wcsmbs/bits/wchar2.h:139:8: note: in a call to function 'size_t wcslcpy(wchar_t*, const wchar_t*, size_t)' declared with attribute 'access (write_only, 1, 3)'
139 | __NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1062:13: warning: 'char* fgets(char*, int, FILE*)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1062 | if (fgets (buf, buf_size + 1, stdin) != buf)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
../libio/bits/stdio2.h:305:1: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)'
305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
| ^~~~~
./tst-fortify.c:1187:12: warning: 'ssize_t read(int, void*, size_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
In file included from ../include/bits/unistd.h:1,
from ../posix/unistd.h:1217,
from ../include/unistd.h:2,
from ./tst-fortify.c:35:
../posix/bits/unistd.h:26:1: note: in a call to function 'ssize_t read(int, void*, size_t)' declared with attribute 'access (write_only, 2, 3)'
26 | read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
| ^~~~
./tst-fortify.c:1211:13: warning: 'ssize_t pread(int, void*, size_t, __off_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:40:1: note: in a call to function 'ssize_t pread(int, void*, size_t, __off_t)' declared with attribute 'access (write_only, 2, 3)'
40 | pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~
./tst-fortify.c:1237:15: warning: 'ssize_t pread64(int, void*, size_t, __off64_t)' writing 11 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:111:6: note: destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../posix/bits/unistd.h:66:1: note: in a call to function 'ssize_t pread64(int, void*, size_t, __off64_t)' declared with attribute 'access (write_only, 2, 3)'
66 | pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
| ^~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:401:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:518:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1386:16: warning: 'ssize_t readlink(const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1386 | if (readlink (fname, readlinkbuf + 3, 4) != 3)
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:81:8: note: in a call to function 'ssize_t readlink(const char*, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
81 | __NTH (readlink (const char *__restrict __path,
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1411:18: warning: 'ssize_t readlinkat(int, const char*, char*, size_t)' writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1411 | if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3,
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | 4) != 3)
| ~~
./tst-fortify.c:1371:8: note: at offset 3 into destination object 'readlinkbuf' of size 4
1371 | char readlinkbuf[4];
| ^~~~~~~~~~~
../posix/bits/unistd.h:97:8: note: in a call to function 'ssize_t readlinkat(int, const char*, char*, size_t)' declared with attribute 'access (write_only, 3, 4)'
97 | __NTH (readlinkat (int __fd, const char *__restrict __path,
| ^~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1657:16: warning: 'size_t wcstombs(char*, const wchar_t*, size_t)' writing 10 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1657 | wcstombs (smallbuf, wcp, 10);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1655:12: note: destination object 'smallbuf' of size 2
1655 | char smallbuf[2];
| ^~~~~~~~
../stdlib/bits/stdlib.h:159:8: note: in a call to function 'size_t wcstombs(char*, const wchar_t*, size_t)' declared with attribute 'access (read_only, 2)'
159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
| ^~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1712:11: warning: 'size_t confstr(int, char*, size_t)' writing 4096 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1712 | confstr (_CS_GNU_LIBC_VERSION, smallbuf, sizeof (largebuf));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1711:8: note: destination object 'smallbuf' of size 1
1711 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:133:8: note: in a call to function 'size_t confstr(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
133 | __NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1723:19: warning: 'int getgroups(int, __gid_t*)' writing 20 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1723 | ngr = getgroups (5, (gid_t *) smallbuf);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1722:8: note: destination object 'smallbuf' of size 1
1722 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:146:8: note: in a call to function 'int getgroups(int, __gid_t*)' declared with attribute 'access (write_only, 2, 1)'
146 | __NTH (getgroups (int __size,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1738:21: warning: 'int ttyname_r(int, char*, size_t)' writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
1738 | if (ttyname_r (fd, smallbuf, sizeof (smallbuf) + 1) == 0)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1737:12: note: destination object 'smallbuf' of size 2
1737 | char smallbuf[2];
| ^~~~~~~~
../posix/bits/unistd.h:160:8: note: in a call to function 'int ttyname_r(int, char*, size_t)' declared with attribute 'access (write_only, 2, 3)'
160 | __NTH (ttyname_r (int __fd,
| ^~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1750:15: warning: 'int gethostname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1750 | gethostname (smallbuf, sizeof (hostnamelarge));
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1749:8: note: destination object 'smallbuf' of size 1
1749 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:189:8: note: in a call to function 'int gethostname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
189 | __NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1759:14: warning: 'int getlogin_r(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1759 | getlogin_r (smallbuf, sizeof (loginlarge));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1758:8: note: destination object 'smallbuf' of size 1
1758 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:175:1: note: in a call to function 'int getlogin_r(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
175 | getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
| ^~~~~~~~~~
./tst-fortify.c:1769:23: warning: 'int getdomainname(char*, size_t)' writing 1000 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
1769 | res = getdomainname (smallbuf, sizeof (domainnamelarge));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:1768:8: note: destination object 'smallbuf' of size 1
1768 | char smallbuf[1];
| ^~~~~~~~
../posix/bits/unistd.h:204:8: note: in a call to function 'int getdomainname(char*, size_t)' declared with attribute 'access (write_only, 1, 2)'
204 | __NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
| ^~~~~~~~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:1816:8: warning: 'int poll(pollfd*, nfds_t, int)' writing 16 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
1816 | poll (fds, 2, 0);
| ~~~~~^~~~~~~~~~~
./tst-fortify.c:1810:17: note: destination object 'fds' of size 8
1810 | struct pollfd fds[1];
| ^~~
In file included from ../include/bits/poll2.h:1,
from ../io/sys/poll.h:87,
from ../include/sys/poll.h:2,
from ./tst-fortify.c:37:
../include/bits/../../io/bits/poll2.h:38:1: note: in a call to function 'int poll(pollfd*, nfds_t, int)' declared with attribute 'access (write_only, 1, 2)'
38 | poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
| ^~~~
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* mempcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:493:24:
../string/bits/string_fortified.h:45:34: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
45 | return __builtin___mempcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
46 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:849:17:
../misc/sys/cdefs.h:354:30: warning: call to '__wmempcpy_chk_warn' declared with attribute warning: wmempcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:55:10: note: in expansion of macro '__glibc_fortify_n'
55 | return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1034:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1036:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1041:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1263:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int ptsname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1699:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ptsname_r_chk_warn' declared with attribute warning: ptsname_r called with buflen bigger than size of buf [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:79:10: note: in expansion of macro '__glibc_fortify'
79 | return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int ppoll(pollfd*, nfds_t, const timespec*, const __sigset_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1827:9:
../misc/sys/cdefs.h:337:30: warning: call to '__ppoll_chk_warn' declared with attribute warning: ppoll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:101:10: note: in expansion of macro '__glibc_fortify'
101 | return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:401:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: at offset 9 into destination object 'buf' of size 10
111 | char buf[10];
| ^~~
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'void explicit_bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:518:18:
../string/bits/string_fortified.h:72:24: warning: 'void __explicit_bzero_chk(void*, size_t, size_t)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
72 | __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: at offset 9 into destination object 'a' of size 10
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
../string/bits/string_fortified.h:66:6: note: in a call to function 'void __explicit_bzero_chk(void*, size_t, size_t)' declared with attribute 'access (write_only, 1, 2)'
66 | void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
| ^~~~~~~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:417:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:425:11:
../string/bits/string_fortified.h:111:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:351:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:359:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:367:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:385:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:393:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:409:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:413:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:437:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:731:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:739:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:747:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:765:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:781:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:789:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:805:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:809:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* fgets(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1062:13:
../libio/bits/stdio2.h:316:29: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1121:13:
../libio/bits/stdio2.h:334:29: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread_unlocked(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1160:22:
../libio/bits/stdio2.h:397:38: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t read(int, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1187:12:
../misc/sys/cdefs.h:337:30: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread(int, void*, size_t, __off_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1211:13:
../misc/sys/cdefs.h:337:30: warning: call to '__pread_chk_warn' declared with attribute warning: pread called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:46:10: note: in expansion of macro '__glibc_fortify'
46 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread64(int, void*, size_t, __off64_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1237:15:
../misc/sys/cdefs.h:337:30: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1848:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1852:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:417:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:425:11:
../string/bits/string_fortified.h:111:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
111 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
112 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:351:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:359:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:367:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:385:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:393:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:409:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:413:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'buf' with type 'char [10]' [-Warray-bounds=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:111:6: note: 'buf' declared here
111 | char buf[10];
| ^~~
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:437:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:731:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:739:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:747:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:765:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:781:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:789:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:805:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcpncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:809:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcpncpy_chk_warn' declared with attribute warning: wcpncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:112:10: note: in expansion of macro '__glibc_fortify_n'
112 | return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* fgets(char*, int, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1062:13:
../libio/bits/stdio2.h:316:29: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
316 | return __fgets_chk_warn (__s, __sz, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1121:13:
../libio/bits/stdio2.h:334:29: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
334 | return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t fread_unlocked(void*, size_t, size_t, FILE*)',
inlined from 'int do_test()' at ./tst-fortify.c:1160:22:
../libio/bits/stdio2.h:397:38: warning: call to '__fread_unlocked_chk_warn' declared with attribute warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wattribute-warning]
397 | return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t read(int, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1187:12:
../misc/sys/cdefs.h:337:30: warning: call to '__read_chk_warn' declared with attribute warning: read called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:32:10: note: in expansion of macro '__glibc_fortify'
32 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread(int, void*, size_t, __off_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1211:13:
../misc/sys/cdefs.h:337:30: warning: call to '__pread_chk_warn' declared with attribute warning: pread called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:46:10: note: in expansion of macro '__glibc_fortify'
46 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t pread64(int, void*, size_t, __off64_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1237:15:
../misc/sys/cdefs.h:337:30: warning: call to '__pread64_chk_warn' declared with attribute warning: pread64 called with bigger length than size of the destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:72:10: note: in expansion of macro '__glibc_fortify'
72 | return __glibc_fortify (pread64, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1848:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'const char* inet_ntop(int, const void*, char*, socklen_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1852:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_ntop_chk_warn' declared with attribute warning: inet_ntop called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:36:10: note: in expansion of macro '__glibc_fortify'
36 | return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-3-def.cc:3:
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:1172:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1172 | if (read (fileno (stdin), buf, buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1175:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1175 | if (read (fileno (stdin), buf, buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1181:53: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1181 | if (read (fileno (stdin), buf, l0 + buf_size - 1) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1187:48: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1187 | if (read (fileno (stdin), buf, buf_size + 1) != buf_size + 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1192:53: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1192 | if (read (fileno (stdin), buf, l0 + buf_size + 1) != buf_size + 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1198:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1197 | if (pread (fileno (stdin), buf, buf_size - 1, buf_size - 2)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1198 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1201:52: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1201 | if (pread (fileno (stdin), buf, buf_size - 1, 0) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1205:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1204 | if (pread (fileno (stdin), buf, l0 + buf_size - 1, buf_size - 3)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1205 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1212:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1211 | if (pread (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1212 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1218:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1217 | if (pread (fileno (stdin), buf, l0 + buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1218 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1224:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1223 | if (pread64 (fileno (stdin), buf, buf_size - 1, buf_size - 2)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1224 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1227:54: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1227 | if (pread64 (fileno (stdin), buf, buf_size - 1, 0) != buf_size - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./tst-fortify.c:1231:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1230 | if (pread64 (fileno (stdin), buf, l0 + buf_size - 1, buf_size - 3)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1231 | != buf_size - 1
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1238:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1237 | if (pread64 (fileno (stdin), buf, buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1238 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
./tst-fortify.c:1244:7: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
1243 | if (pread64 (fileno (stdin), buf, l0 + buf_size + 1, 2 * buf_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1244 | != buf_size + 1)
| ^~~~~~~~~~~~~~~
In file included from ../misc/sys/select.h:30,
from ../include/sys/select.h:2,
from ../posix/sys/types.h:179,
from ../include/sys/types.h:1,
from ../sysdeps/unix/sysv/linux/bits/socket.h:29,
from ../socket/sys/socket.h:33,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:23,
from ../include/netinet/in.h:3,
from ../inet/arpa/inet.h:22,
from ../include/arpa/inet.h:3,
from ./tst-fortify.c:26:
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1799:3: note: in expansion of macro 'FD_ISSET'
1799 | FD_ISSET (FD_SETSIZE - 1, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
../bits/select.h:37:51: warning: value computed is not used [-Wunused-value]
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1806:3: note: in expansion of macro 'FD_ISSET'
1806 | FD_ISSET (l0 + FD_SETSIZE, &s);
| ^~~~~~~~
./tst-fortify.c: At global scope:
./tst-fortify.c:128:23: warning: 'wstr5' defined but not used [-Wunused-variable]
128 | static const wchar_t *wstr5 = L"World!\n";
| ^~~~~
./tst-fortify.c:127:23: warning: 'wstr4' defined but not used [-Wunused-variable]
127 | static const wchar_t *wstr4 = L"Hello, ";
| ^~~~~
./tst-fortify.c:126:23: warning: 'wstr3' defined but not used [-Wunused-variable]
126 | static const wchar_t *wstr3 = L"%s%n%s%n";
| ^~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:548:11: warning: 'size_t strlcpy(char*, const char*, size_t)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
548 | strlcpy (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c:160:19: note: at offset 6 into destination object 'do_test()::A::buf1' of size 9
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^~~~
In file included from ../include/sys/cdefs.h:10,
from ../include/features.h:524,
from ./tst-fortify.c:20:
../string/bits/string_fortified.h:161:8: note: in a call to function 'size_t strlcpy(char*, const char*, size_t)' declared with attribute 'access (write_only, 1, 3)'
161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
./tst-fortify.c:585:11: warning: 'size_t strlcat(char*, const char*, size_t)' accessing 4 bytes in a region of size 3 [-Wstringop-overflow=]
585 | strlcat (a.buf1 + (O + 6), "X", 4);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../string/bits/string_fortified.h:179:8: note: in a call to function 'size_t strlcat(char*, const char*, size_t)' declared with attribute 'access (read_write, 1, 3)'
179 | __NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| ^~~~~~~
../misc/sys/cdefs.h:91:37: note: in definition of macro '__NTH'
91 | # define __NTH(fct) __LEAF_ATTR fct __THROW
| ^~~
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/support/libsupport_nonshared.a(xdlfcn.oS): in function `xdlopen':
/var/pisi/glibc-2.42-17/work/glibc-2.42/support/xdlfcn.c:26:(.text+0x5): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-1-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x32c8): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-1-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x8c7d): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-2-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x31c7): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-2-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x6b92): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-3-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:299:(.text+0x336d): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x340a): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-default-3-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x78e7): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-1-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x32c8): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-1-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x8c7d): warning: the `getwd' function is dangerous and should not be used.
/var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-2-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x31c7): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-2-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x6b92): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-3-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:299:(.text+0x336d): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x340a): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-lfs-3-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x78e7): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-1-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x2f4a): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-1-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x819d): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-2-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x2d65): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-2-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x62c2): warning: the `getwd' function is dangerous and should not be used.
/var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-3-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:299:(.text+0x7298): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x3193): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-c-nongnu-3-def.o: in function `getwd':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x6d59): warning: the `getwd' function is dangerous and should not be used.
./tst-fortify.c:459:11: warning: 'char* __builtin___strncat_chk(char*, const char*, long unsigned int, long unsigned int)' output truncated copying 3 bytes from a string of length 5 [-Wstringop-truncation]
459 | strncat (buf, "ZYXWV", 3);
| ^
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-1-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x32c8): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-1-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x84ec): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-3-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:299:(.text+0x82e1): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-3-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x44da): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-3-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x8a0a): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-2-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x3fcd): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-default-2-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x85ca): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-1-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x32c8): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-1-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x84ec): warning: the `getwd' function is dangerous and should not be used.
In file included from ../include/bits/string_fortified.h:1,
from ../string/string.h:548,
from ../include/string.h:60,
from ../malloc/obstack.h:136,
from ../include/obstack.h:2,
from ./tst-fortify.c:29:
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:468:10:
../string/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memmove(void*, const void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:476:11:
../string/bits/string_fortified.h:36:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
36 | return __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
37 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In file included from ../include/bits/strings_fortified.h:1,
from ../string/strings.h:144,
from ../include/strings.h:1,
from ../string/string.h:462:
In function 'void bcopy(const void*, void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:484:9:
../string/bits/strings_fortified.h:25:34: warning: 'void* __builtin___memmove_chk(void*, const void*, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
25 | (void) __builtin___memmove_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
26 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void* memset(void*, int, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:502:10:
../string/bits/string_fortified.h:59:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
In function 'void bzero(void*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:510:9:
../string/bits/strings_fortified.h:32:33: warning: 'void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int)' forming offset 10 is out of the bounds [0, 10] of object 'a' with type 'do_test()::A' [-Warray-bounds=]
32 | (void) __builtin___memset_chk (__dest, '\0', __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
33 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
./tst-fortify.c: In function 'int do_test()':
./tst-fortify.c:160:44: note: 'a' declared here
160 | struct A { char buf1[9]; char buf2[1]; } a;
| ^
/usr/bin/ld: /usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-2-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x3fcd): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-2-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x85ca): warning: the `getwd' function is dangerous and should not be used.
/var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-3-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:299:(.text+0x82e1): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-3-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x44da): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-lfs-3-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x8a0a): warning: the `getwd' function is dangerous and should not be used.
In function 'char* strcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:532:10:
../string/bits/string_fortified.h:81:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 6 bytes into a region of size 5 overflows the destination [-Wstringop-overflow=]
81 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* stpcpy(char*, const char*)',
inlined from 'int do_test()' at ./tst-fortify.c:536:14:
../string/bits/string_fortified.h:90:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' writing 2 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
90 | return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:540:11:
../string/bits/string_fortified.h:100:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 4 bytes into a region of size 3 overflows the destination [-Wstringop-overflow=]
100 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
101 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/stdio2.h:1,
from ../libio/stdio.h:970,
from ../include/stdio.h:14,
from ./tst-fortify.c:32:
In function 'int snprintf(char*, size_t, const char*, ...)',
inlined from 'int do_test()' at ./tst-fortify.c:566:12:
../libio/bits/stdio2.h:68:35: warning: 'int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)' specified bound 3 exceeds destination size 2 [-Wstringop-overflow=]
68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:832:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemcpy_chk_warn' declared with attribute warning: wmemcpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:30:10: note: in expansion of macro '__glibc_fortify_n'
30 | return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:840:12:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemmove_chk_warn' declared with attribute warning: wmemmove called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:42:10: note: in expansion of macro '__glibc_fortify_n'
42 | return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wmemset(wchar_t*, wchar_t, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:858:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wmemset_chk_warn' declared with attribute warning: wmemset called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:68:10: note: in expansion of macro '__glibc_fortify_n'
68 | return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:880:11:
../misc/sys/cdefs.h:354:30: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:100:10: note: in expansion of macro '__glibc_fortify_n'
100 | return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1034:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1036:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1041:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In function 'char* gets(char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1263:12:
../libio/bits/stdio2.h:299:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
299 | return __gets_warn (__str);
| ~~~~~~~~~~~~^~~~~~~
In file included from ../include/bits/socket2.h:1,
from ../socket/sys/socket.h:343:
In function 'ssize_t recv(int, void*, size_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1312:16:
../socket/bits/socket2.h:45:28: warning: call to '__recv_chk_warn' declared with attribute warning: recv called with bigger length than size of destination buffer [-Wattribute-warning]
45 | return __recv_chk_warn (__fd, __buf, __n, __sz, __flags);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1343:20:
../socket/bits/socket2.h:79:32: warning: call to '__recvfrom_chk_warn' declared with attribute warning: recvfrom called with bigger length than size of destination buffer [-Wattribute-warning]
79 | return __recvfrom_chk_warn (__fd, __buf, __n, __sz, __flags, __addr,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 | __addr_len);
| ~~~~~~~~~~~
In function 'ssize_t readlink(const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1386:16:
../misc/sys/cdefs.h:337:30: warning: call to '__readlink_chk_warn' declared with attribute warning: readlink called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:89:10: note: in expansion of macro '__glibc_fortify'
89 | return __glibc_fortify (readlink, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'ssize_t readlinkat(int, const char*, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1411:18:
../misc/sys/cdefs.h:337:30: warning: call to '__readlinkat_chk_warn' declared with attribute warning: readlinkat called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:104:10: note: in expansion of macro '__glibc_fortify'
104 | return __glibc_fortify (readlinkat, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'char* getcwd(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1465:15:
../misc/sys/cdefs.h:337:30: warning: call to '__getcwd_chk_warn' declared with attribute warning: getcwd caller with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:116:10: note: in expansion of macro '__glibc_fortify'
116 | return __glibc_fortify (getcwd, __size, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/stdlib.h:1,
from ../stdlib/stdlib.h:1165,
from ../include/stdlib.h:16,
from ./tst-fortify.c:33:
In function 'char* realpath(const char*, char*)',
inlined from 'int do_test()' at ./tst-fortify.c:1512:22:
../stdlib/bits/stdlib.h:53:32: warning: call to '__realpath_chk_warn' declared with attribute warning: second argument of realpath must be either NULL or at least PATH_MAX bytes long buffer [-Wattribute-warning]
53 | return __realpath_chk_warn (__name, __resolved, __sz);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1576:17:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsrtowcs_chk_warn' declared with attribute warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:315:10: note: in expansion of macro '__glibc_fortify_n'
315 | return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbstowcs(wchar_t*, const char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1599:16:
../misc/sys/cdefs.h:354:30: warning: call to '__mbstowcs_chk_warn' declared with attribute warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:139:12: note: in expansion of macro '__glibc_fortify_n'
139 | return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1619:18:
../misc/sys/cdefs.h:354:30: warning: call to '__mbsnrtowcs_chk_warn' declared with attribute warning: mbsnrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wattribute-warning]
354 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:343:10: note: in expansion of macro '__glibc_fortify_n'
343 | return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
| ^~~~~~~~~~~~~~~~~
In function 'size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1638:17:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsrtombs_chk_warn' declared with attribute warning: wcsrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:328:10: note: in expansion of macro '__glibc_fortify'
328 | return __glibc_fortify (wcsrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcstombs(char*, const wchar_t*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1657:16:
../misc/sys/cdefs.h:337:30: warning: call to '__wcstombs_chk_warn' declared with attribute warning: wcstombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../stdlib/bits/stdlib.h:163:10: note: in expansion of macro '__glibc_fortify'
163 | return __glibc_fortify (wcstombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1676:18:
../misc/sys/cdefs.h:337:30: warning: call to '__wcsnrtombs_chk_warn' declared with attribute warning: wcsnrtombs called with dst buffer smaller than len [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../wcsmbs/bits/wchar2.h:356:10: note: in expansion of macro '__glibc_fortify'
356 | return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'size_t confstr(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1712:11:
../misc/sys/cdefs.h:337:30: warning: call to '__confstr_chk_warn' declared with attribute warning: confstr called with bigger length than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:139:10: note: in expansion of macro '__glibc_fortify'
139 | return __glibc_fortify (confstr, __len, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getgroups(int, __gid_t*)',
inlined from 'int do_test()' at ./tst-fortify.c:1723:19:
../misc/sys/cdefs.h:337:30: warning: call to '__getgroups_chk_warn' declared with attribute warning: getgroups called with bigger group count than what can fit into destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:153:10: note: in expansion of macro '__glibc_fortify'
153 | return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
| ^~~~~~~~~~~~~~~
In function 'int ttyname_r(int, char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1738:21:
../misc/sys/cdefs.h:337:30: warning: call to '__ttyname_r_chk_warn' declared with attribute warning: ttyname_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:167:10: note: in expansion of macro '__glibc_fortify'
167 | return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int gethostname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1750:15:
../misc/sys/cdefs.h:337:30: warning: call to '__gethostname_chk_warn' declared with attribute warning: gethostname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:195:10: note: in expansion of macro '__glibc_fortify'
195 | return __glibc_fortify (gethostname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getlogin_r(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1759:14:
../misc/sys/cdefs.h:337:30: warning: call to '__getlogin_r_chk_warn' declared with attribute warning: getlogin_r called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:180:10: note: in expansion of macro '__glibc_fortify'
180 | return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int getdomainname(char*, size_t)',
inlined from 'int do_test()' at ./tst-fortify.c:1769:23:
../misc/sys/cdefs.h:337:30: warning: call to '__getdomainname_chk_warn' declared with attribute warning: getdomainname called with bigger buflen than size of destination buffer [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:210:10: note: in expansion of macro '__glibc_fortify'
210 | return __glibc_fortify (getdomainname, __buflen, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from ../include/bits/select2.h:1,
from ../misc/sys/select.h:150:
./tst-fortify.c: In function 'int do_test()':
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:33:27: note: in expansion of macro '__FD_ELT'
33 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:85:33: note: in expansion of macro '__FD_SET'
85 | #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1780:3: note: in expansion of macro 'FD_SET'
1780 | FD_SET (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:35:27: note: in expansion of macro '__FD_ELT'
35 | ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
| ^~~~~~~~
../misc/sys/select.h:86:33: note: in expansion of macro '__FD_CLR'
86 | #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
| ^~~~~~~~
./tst-fortify.c:1791:3: note: in expansion of macro 'FD_CLR'
1791 | FD_CLR (FD_SETSIZE, &s);
| ^~~~~~
../include/bits/../../misc/bits/select2.h:32:25: warning: call to '__fdelt_warn' declared with attribute warning: bit outside of fd_set selected [-Wattribute-warning]
32 | : __fdelt_warn (__d)) \
| ~~~~~~~~~~~~~^~~~~
../bits/select.h:37:20: note: in expansion of macro '__FD_ELT'
37 | ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
| ^~~~~~~~
../misc/sys/select.h:87:33: note: in expansion of macro '__FD_ISSET'
87 | #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
| ^~~~~~~~~~
./tst-fortify.c:1802:3: note: in expansion of macro 'FD_ISSET'
1802 | FD_ISSET (FD_SETSIZE, &s);
| ^~~~~~~~
In function 'int poll(pollfd*, nfds_t, int)',
inlined from 'int do_test()' at ./tst-fortify.c:1816:8:
../misc/sys/cdefs.h:337:30: warning: call to '__poll_chk_warn' declared with attribute warning: poll called with fds buffer too small file nfds entries [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../include/bits/../../io/bits/poll2.h:44:10: note: in expansion of macro '__glibc_fortify'
44 | return __glibc_fortify (poll, __nfds, sizeof (*__fds),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1868:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1872:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
In function 'int inet_pton(int, const char*, void*)',
inlined from 'int do_test()' at ./tst-fortify.c:1876:13:
../misc/sys/cdefs.h:337:30: warning: call to '__inet_pton_chk_warn' declared with attribute warning: inet_pton called with a destination buffer size too small [-Wattribute-warning]
337 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../inet/bits/inet-fortified.h:56:10: note: in expansion of macro '__glibc_fortify'
56 | return __glibc_fortify (inet_pton, sz, sizeof (char),
| ^~~~~~~~~~~~~~~
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-1-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x2f4a): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-1-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x7a6c): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-2-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x3b13): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-2-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x7ba2): warning: the `getwd' function is dangerous and should not be used.
*** stack smashing detected ***: terminated
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-3-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:299:(.text+0x7b09): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-3-def.o: in function `gets':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../libio/bits/stdio2.h:298:(.text+0x3ec3): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/debug/tst-fortify-cc-nongnu-3-def.o: in function `do_test()':
/var/pisi/glibc-2.42-17/work/glibc-2.42/debug/../posix/bits/unistd.h:127:(.text+0x826a): warning: the `getwd' function is dangerous and should not be used.
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/nss/tst-getpw.o: in function `check':
/var/pisi/glibc-2.42-17/work/glibc-2.42/nss/tst-getpw.c:40:(.text+0xd): warning: the `getpw' function is dangerous and should not be used.
/tmp/ccitf13c.s: Assembler messages:
/tmp/ccitf13c.s:109: Warning: ignoring changed section attributes for .text
+ common_objpfx=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/
+ test_wrapper_env=' env'
+ run_program_env='GCONV_PATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconvdata LOCPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/localedata LC_ALL=C'
+ testroot=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory
+ trap cleanup 0
+ rm -rf /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory
+ mkdir -p /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/etc
+ ln -s libdoesnotexist.so.1.1 /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist.so.1
+ ln -s /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/opt/sw/lib/libdoesnotexist2.so.1.1 /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/
+ errors=0
+ check_files
+ for name in libdoesnotexist.so.1 libdoesnotexist2.so.1.1
+ path=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist.so.1
+ test '!' -h /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist.so.1
+ for name in libdoesnotexist.so.1 libdoesnotexist2.so.1.1
+ path=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist2.so.1.1
+ test '!' -h /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist2.so.1.1
+ env GCONV_PATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconvdata LOCPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/localedata LC_ALL=C /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/ldconfig -X -f /dev/null -C /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/etc/ld.so.cache /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib
+ check_files
+ for name in libdoesnotexist.so.1 libdoesnotexist2.so.1.1
+ path=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist.so.1
+ test '!' -h /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist.so.1
+ for name in libdoesnotexist.so.1 libdoesnotexist2.so.1.1
+ path=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist2.so.1.1
+ test '!' -h /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory/lib/libdoesnotexist2.so.1.1
+ exit 0
+ cleanup
+ rm -rf /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug19610-test-directory
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/tst-ro-dynamic-mod.so: section `.relr.dyn' can't be allocated in segment 0
LOAD: .dynamic .rodata .dynsym .dynstr .gnu.hash .relr.dyn .note.gnu.property .note.gnu.build-id
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/tst-dlopen-sgid.o: in function `alternative_main':
/var/pisi/glibc-2.42-17/work/glibc-2.42/elf/tst-dlopen-sgid.c:91:(.text+0x1d1): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/support/libsupport_nonshared.a(xdlfcn.oS): in function `xdlopen':
/var/pisi/glibc-2.42-17/work/glibc-2.42/support/xdlfcn.c:26:(.text+0x5): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/tst-linkall-static.o:(.data.rel+0x18): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/libc.a(gai_misc.o): in function `handle_requests':
/var/pisi/glibc-2.42-17/work/glibc-2.42/resolv/gai_misc.c:329:(.text+0x103): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/support/libsupport_nonshared.a(xdlfcn.oS): in function `xdlopen':
/var/pisi/glibc-2.42-17/work/glibc-2.42/support/xdlfcn.c:26:(.text+0x5): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/tst-single_threaded-static-dlopen.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/elf/tst-single_threaded-static-dlopen.c:38:(.text+0x2d): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/tst-tls9-static.o: in function `do_test':
/var/pisi/glibc-2.42-17/work/glibc-2.42/elf/tst-tls9.c:14:(.text+0x13): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/tst-ifunc-textrel.o: warning: relocation in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
+ common_objpfx=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/
+ test_wrapper_env=' env'
+ run_program_env='GCONV_PATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconvdata LOCPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/localedata LC_ALL=C'
+ testroot=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug30125-test-directory
+ trap cleanup 0
+ rm -rf /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug30125-test-directory
+ mkdir -p /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug30125-test-directory/lib
+ cp /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/tst-ldconfig-soname-lib-with-soname.so /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug30125-test-directory/lib/libtst-ldconfig-soname-lib-with-soname.so.1.2.3
+ cp /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/tst-ldconfig-soname-lib-without-soname.so /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug30125-test-directory/lib/libtst-ldconfig-soname-lib-without-soname.so.1.2.3
+ env GCONV_PATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/iconvdata LOCPATH=/var/pisi/glibc-2.42-17/work/glibc-2.42/build/localedata LC_ALL=C /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/ldconfig -vn /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug30125-test-directory/lib
++ cd /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug30125-test-directory/lib
++ find . -type l
+ LINKS=./libtst-ldconfig-soname-lib-with-soname.so.1
+ '[' ./libtst-ldconfig-soname-lib-with-soname.so.1 '!=' ./libtst-ldconfig-soname-lib-with-soname.so.1 ']'
+ cleanup
+ rm -rf /var/pisi/glibc-2.42-17/work/glibc-2.42/build/elf/bug30125-test-directory
grep: write error: Broken pipe
make[1]: *** [Makefile:678: tests] Error 1
make: *** [Makefile:23: check] Error 2
configure: WARNING: you should use --build, --host, --target
plural.y:51.1-7: warning: POSIX Yacc does not support %define [-Wyacc]
51 | %define api.pure full
| ^~~~~~~
plural.y:52.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
52 | %expect 7
| ^~~~~~~
/bin/sh: line 1: /var/pisi/glibc-2.42-17/work-emul32/glibc-2.42/build/elf/dso-sort-tests-all3.def: No such file or directory
/bin/sh: line 1: /var/pisi/glibc-2.42-17/work-emul32/glibc-2.42/build/elf/dso-sort-tests-all4.def: No such file or directory
/bin/sh: line 1: /var/pisi/glibc-2.42-17/work-emul32/glibc-2.42/build/elf/dso-sort-tests-all2.def: No such file or directory
sed: can't read /var/pisi/glibc-2.42-17/work-emul32/glibc-2.42/build/csu/32/crtn.o.dt: No such file or directory
Makefile:68: warning: pattern recipe did not update peer target 'top-menu./var/pisi/glibc-2.42-17/work-emul32/glibc-2.42/build/manual/texi'.