public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Sunil Pandey <skpgkp2@gmail.com>
To: "Carlos O'Donell" <carlos@redhat.com>, tom@honermann.net
Cc: 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 09:08:55 -0700	[thread overview]
Message-ID: <CAMAf5_csDnpXpUyieKXn2UCp2usiasisCniRUn4FKMh7XFU07A@mail.gmail.com> (raw)
In-Reply-To: <CAMAf5_fj8ez8=Zswex4Eb9Po8HoL5=WacrNz8kCO=hY5XnPBCQ@mail.gmail.com>

On Fri, Jul 29, 2022 at 8:43 AM Sunil Pandey <skpgkp2@gmail.com> wrote:
>
> On Fri, Jul 29, 2022 at 8:26 AM Carlos O'Donell via Libc-alpha
> <libc-alpha@sourceware.org> 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.
> >
> > --
> > Cheers,
> > Carlos.
> >
>
> I am getting these 2 wide string test failures on my SKX server.
>
> FAIL: wcsmbs/test-c8rtomb (Not reproducible)
>
> FAIL: wcsmbs/test-mbrtoc8
>
> $ wcsmbs/test-mbrtoc8
> test-mbrtoc8.c:477: numeric comparison failure
>    left: 2 (0x2); from: mbrtoc8 (buf, mbs, 1, &s)
>   right: 1 (0x1); from: (size_t) 1
> test-mbrtoc8.c:479: numeric comparison failure
>    left: 0 (0x0); from: buf[0]
>   right: 195 (0xc3); from: 0xC3
> test-mbrtoc8.c:481: numeric comparison failure
>    left: 204 (0xcc); from: buf[0]
>   right: 138 (0x8a); from: 0x8A
> test-mbrtoc8.c:483: numeric comparison failure
>    left: 132 (0x84); from: buf[0]
>   right: 204 (0xcc); from: 0xCC
> test-mbrtoc8.c:484: numeric comparison failure
>    left: 0 (0x0); from: mbrtoc8 (buf, mbs, 1, &s)
>   right: 18446744073709551613 (0xfffffffffffffffd); from: (size_t) -3
> test-mbrtoc8.c:485: numeric comparison failure
>    left: 0 (0x0); from: buf[0]
>   right: 132 (0x84); from: 0x84
> test-mbrtoc8.c:516: numeric comparison failure
>    left: 2 (0x2); from: mbrtoc8 (buf, mbs, 1, &s)
>   right: 1 (0x1); from: (size_t) 1
> test-mbrtoc8.c:518: numeric comparison failure
>    left: 0 (0x0); from: buf[0]
>   right: 195 (0xc3); from: 0xC3
> test-mbrtoc8.c:520: numeric comparison failure
>    left: 204 (0xcc); from: buf[0]
>   right: 170 (0xaa); from: 0xAA
> test-mbrtoc8.c:522: numeric comparison failure
>    left: 140 (0x8c); from: buf[0]
>   right: 204 (0xcc); from: 0xCC
> test-mbrtoc8.c:523: numeric comparison failure
>    left: 0 (0x0); from: mbrtoc8 (buf, mbs, 1, &s)
>   right: 18446744073709551613 (0xfffffffffffffffd); from: (size_t) -3
> test-mbrtoc8.c:524: numeric comparison failure
>    left: 0 (0x0); from: buf[0]
>   right: 140 (0x8c); from: 0x8C
> error: 12 test failures

These 2 tests fail on their first commit itself, unless this issue
is specific to my machine.

commit f4fe72a4f7b22588a7c902e39ddd3dcd244bbf9f (HEAD)
Author: Tom Honermann <tom@honermann.net>
Date:   Thu Jun 30 08:52:15 2022 -0400

    stdlib: Tests for mbrtoc8, c8rtomb, and the char8_t typedef.

  reply	other threads:[~2022-07-29 16:09 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 [this message]
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
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=CAMAf5_csDnpXpUyieKXn2UCp2usiasisCniRUn4FKMh7XFU07A@mail.gmail.com \
    --to=skpgkp2@gmail.com \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=tom@honermann.net \
    /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).