public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Carlos O'Donell <carlos@redhat.com>,
	libc-alpha <libc-alpha@sourceware.org>
Subject: Re: glibc 2.36 build failure on Fedora 36 with gcc 12 (-Werror=use-after-free)
Date: Fri, 29 Jul 2022 17:52:33 +0200	[thread overview]
Message-ID: <d440cf7dd4de4260849d9216986f3a1b47968837.camel@klomp.org> (raw)
In-Reply-To: <ba9bccae-17db-0133-9361-c22582604eed@redhat.com>

Hi Carlos,

On Fri, 2022-07-29 at 11:26 -0400, Carlos O'Donell via Libc-alpha
wrote:
> Just posting here for the record that I see a glibc 2.36 build
> failure
> with Fedora 36 and gcc 12.
> 
> localealias.c: In function ‘read_alias_file’:
> localealias.c:335:56: error: pointer may be used after ‘realloc’ [-
> Werror=use-after-free]
>   335 |                               map[i].alias += new_pool -
> string_space;
>       |                                               ~~~~~~~~~^~~~~~
> ~~~~~~~~
> localealias.c:325:49: note: call to ‘realloc’ here
>   325 |                       char *new_pool = (char *) realloc
> (string_space, new_size);
>       |                                                 ^~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> I'm going to review this quickly before we make the glibc release.

We aren't seeing those on the Fedora 36 buildbot or on other gcc 12
using distros:
https://builder.sourceware.org/buildbot/#/builders?tags=glibc

There was a bug in earlier gcc12 releases with realloc that was fixed
by 
https://gcc.gnu.org/r12-6712-g2f714642e574c64e1c0e093cad3de6f8accb6ec7

Maybe updating gcc might help?

Cheers,

Mark

  parent reply	other threads:[~2022-07-29 15:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 15:26 Carlos O'Donell
2022-07-29 15:43 ` Sunil Pandey
2022-07-29 16:08   ` Sunil Pandey
2022-07-29 17:46     ` Sunil Pandey
2022-07-29 17:52       ` H.J. Lu
2022-07-29 18:07         ` Sunil Pandey
2022-07-29 15:52 ` Mark Wielaard [this message]
2022-07-29 16:34 ` Carlos O'Donell
2022-07-29 16:39 ` Paul Eggert
2022-07-29 16:50   ` Andreas Schwab

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=d440cf7dd4de4260849d9216986f3a1b47968837.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.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).