From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lug-owl.de (lug-owl.de [188.68.32.151]) by sourceware.org (Postfix) with ESMTPS id C2EC13858D32 for ; Sat, 1 Apr 2023 20:20:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2EC13858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lug-owl.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lug-owl.de Received: by lug-owl.de (Postfix, from userid 1001) id E259C42095; Sat, 1 Apr 2023 22:20:18 +0200 (CEST) Date: Sat, 1 Apr 2023 22:20:18 +0200 From: Jan-Benedict Glaw To: Sam James Cc: libc-alpha@sourceware.org, marxin@gcc.gnu.org Subject: Re: Wrong warning in open_catalog.c with trunk GCC? Message-ID: <20230401202018.w3d5yez7zab64hxe@lug-owl.de> References: <20230401190923.mwd273x54a5b67zm@lug-owl.de> <87o7o7fm0w.fsf@gentoo.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zrxepgelyzzm7ijf" Content-Disposition: inline In-Reply-To: <87o7o7fm0w.fsf@gentoo.org> X-Operating-System: Linux chamaeleon 5.14.0-0.bpo.2-amd64 X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-message-flag: Please send plain text messages only. Do not send HTML emails. Thank you. User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --zrxepgelyzzm7ijf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Sam, On Sat, 2023-04-01 20:18:26 +0100, Sam James wrote: > Jan-Benedict Glaw writes: > > With the CI builds, after supplying --disable-gcov to gcc-first, I see > > this while building glibc: [...] > > open_catalog.c: In function =E2=80=98__open_catalog=E2=80=99: > > open_catalog.c:64:11: error: pointer =E2=80=98old_buf=E2=80=99 may be u= sed after =E2=80=98realloc=E2=80=99 [-Werror=3Duse-after-free] > > 64 | free (old_buf); = \ > > | ^~~~~~~~~~~~~~ > > open_catalog.c:86:15: note: in expansion of macro =E2=80=98ENOUGH=E2=80= =99 > > 86 | ENOUGH (len); > > | ^~~~~~ > > open_catalog.c:61:13: note: call to =E2=80=98realloc=E2=80=99 here > > 61 | buf =3D realloc (buf, bufmax); = \ > > | ^~~~~~~~~~~~~~~~~~~~~ [...] >=20 > See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109170. 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 --=20 --zrxepgelyzzm7ijf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCZCiR/gAKCRAdvV51g5nh u5GwAKCLhm0Zw1JJRkgqxex0eB0EEWKmOACcCxq7mU5C1tgsvO2GritSjObupFM= =0gDy -----END PGP SIGNATURE----- --zrxepgelyzzm7ijf--