From: Joseph Myers <joseph@codesourcery.com>
To: Martin Sebor <msebor@gmail.com>
Cc: DJ Delorie <dj@redhat.com>, <libc-alpha@sourceware.org>
Subject: Re: [PATCH] improve out-of-bounds checking with GCC 10 attribute access [BZ #25219]
Date: Wed, 6 May 2020 20:44:38 +0000 [thread overview]
Message-ID: <alpine.DEB.2.21.2005062040410.18350@digraph.polyomino.org.uk> (raw)
In-Reply-To: <8d359caf-0522-c753-af3d-2680d54a0cb8@gmail.com>
How exactly was this patch tested? I'm seeing glibc testsuite build
failures with GCC 10 on what looks like every configuration supported by
build-many-glibcs.py, with errors referencing these attributes. (I
haven't bisected to confirm the responsible commit; this is with the first
run of my bot for GCC 10, and my GCC mainline bot had the build fail
earlier because of GCC bugs at the relevant time.)
test-errno.c: In function 'do_test':
test-errno.c:122:30: error: argument 1 value -1 is negative [-Werror=stringop-overflow=]
122 | fails |= test_wrp (EINVAL, getgroups, -1, 0);
| ^
test-errno.c:65:17: note: in definition of macro 'test_wrp_rv'
65 | rtype ret = syscall (__VA_ARGS__); \
| ^~~~~~~
test-errno.c:122:12: note: in expansion of macro 'test_wrp'
122 | fails |= test_wrp (EINVAL, getgroups, -1, 0);
| ^~~~~~~~
In file included from ../include/unistd.h:2,
from test-errno.c:35:
../posix/unistd.h:701:12: note: in a call to function 'getgroups' declared with attribute 'write_only (2, 1)'
701 | extern int getgroups (int __size, __gid_t __list[]) __THROW __wur
| ^~~~~~~~~
test-errno.c:137:30: error: 'readlink' specified size 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
137 | fails |= test_wrp (EINVAL, readlink, "/", buf, -1);
| ^
test-errno.c:65:17: note: in definition of macro 'test_wrp_rv'
65 | rtype ret = syscall (__VA_ARGS__); \
| ^~~~~~~
test-errno.c:137:12: note: in expansion of macro 'test_wrp'
137 | fails |= test_wrp (EINVAL, readlink, "/", buf, -1);
| ^~~~~~~~
In file included from ../include/unistd.h:2,
from test-errno.c:35:
../posix/unistd.h:820:16: note: in a call to function 'readlink' declared with attribute 'write_only (2, 3)'
820 | extern ssize_t readlink (const char *__restrict __path,
| ^~~~~~~~
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2020-05-06 20:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 22:12 Martin Sebor
2020-04-30 22:37 ` Dmitry V. Levin
2020-05-01 2:42 ` DJ Delorie
2020-05-01 19:54 ` Martin Sebor
2020-05-01 22:02 ` DJ Delorie
2020-05-04 17:34 ` Martin Sebor
2020-05-04 18:40 ` Martin Sebor
2020-05-06 20:44 ` Joseph Myers [this message]
2020-05-06 21:08 ` DJ Delorie
2020-05-06 22:09 ` Martin Sebor
2020-05-06 22:27 ` Joseph Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.2005062040410.18350@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=dj@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=msebor@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).