From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id A7A653857C76 for ; Fri, 29 Jul 2022 15:52:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A7A653857C76 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id D5C3B303C3D5; Fri, 29 Jul 2022 17:52:34 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 82D8B413CBBB; Fri, 29 Jul 2022 17:52:33 +0200 (CEST) Message-ID: Subject: Re: glibc 2.36 build failure on Fedora 36 with gcc 12 (-Werror=use-after-free) From: Mark Wielaard To: Carlos O'Donell , libc-alpha Date: Fri, 29 Jul 2022 17:52:33 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 15:52:39 -0000 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. >=20 > localealias.c: In function =E2=80=98read_alias_file=E2=80=99: > localealias.c:335:56: error: pointer may be used after =E2=80=98realloc= =E2=80=99 [- > Werror=3Duse-after-free] > 335 | map[i].alias +=3D new_pool - > string_space; > | ~~~~~~~~~^~~~~~ > ~~~~~~~~ > localealias.c:325:49: note: call to =E2=80=98realloc=E2=80=99 here > 325 | char *new_pool =3D (char *) realloc > (string_space, new_size); > | ^~~~~~~~~~~~~ > ~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors >=20 > 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=3Dglibc There was a bug in earlier gcc12 releases with realloc that was fixed by=20 https://gcc.gnu.org/r12-6712-g2f714642e574c64e1c0e093cad3de6f8accb6ec7 Maybe updating gcc might help? Cheers, Mark