From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: Sam James <sam@gentoo.org>
Cc: libc-alpha@sourceware.org, marxin@gcc.gnu.org
Subject: Re: Wrong warning in open_catalog.c with trunk GCC?
Date: Sat, 1 Apr 2023 22:20:18 +0200 [thread overview]
Message-ID: <20230401202018.w3d5yez7zab64hxe@lug-owl.de> (raw)
In-Reply-To: <87o7o7fm0w.fsf@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]
Hi Sam,
On Sat, 2023-04-01 20:18:26 +0100, Sam James <sam@gentoo.org> wrote:
> Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
> > With the CI builds, after supplying --disable-gcov to gcc-first, I see
> > this while building glibc:
[...]
> > open_catalog.c: In function ‘__open_catalog’:
> > open_catalog.c:64:11: error: pointer ‘old_buf’ may be used after ‘realloc’ [-Werror=use-after-free]
> > 64 | free (old_buf); \
> > | ^~~~~~~~~~~~~~
> > open_catalog.c:86:15: note: in expansion of macro ‘ENOUGH’
> > 86 | ENOUGH (len);
> > | ^~~~~~
> > open_catalog.c:61:13: note: call to ‘realloc’ here
> > 61 | buf = realloc (buf, bufmax); \
> > | ^~~~~~~~~~~~~~~~~~~~~
[...]
>
> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109170. When did you
> build your GCC 13? Just now or a week or two ago?
Not sure, but obviously from before that fix got committed. But nice
to see that others catch these early issues as well.
Thanks a lot!
Jan-Benedict
--
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
prev parent reply other threads:[~2023-04-01 20:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-01 19:09 Jan-Benedict Glaw
2023-04-01 19:18 ` Sam James
2023-04-01 20:20 ` Jan-Benedict Glaw [this message]
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=20230401202018.w3d5yez7zab64hxe@lug-owl.de \
--to=jbglaw@lug-owl.de \
--cc=libc-alpha@sourceware.org \
--cc=marxin@gcc.gnu.org \
--cc=sam@gentoo.org \
/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).