From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB2F33858409; Sun, 17 Dec 2023 04:40:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB2F33858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702788033; bh=Qn7k7yFzGDfZTjvJqg9zOE/tMZrCLHN5BVQesPgBOG8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CprqmBytP56mEkPijTv9/04eoDuS3W5C7FBeoTyF/HrlQBp4o9RpDMbl6cCNm65GC 0yURDIdKqUmokVNa7MAOxvbTNYCThJegbzDx7rr/WjrsjGp57s08Qm1Juk9e+ifVVu l2QqotF5lVodTKrjoIRioAYajq5UDuR9t/A4NIbA= From: "lavr at ncbi dot nlm.nih.gov" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104069] Wuse-after-free=2 -O0 false positive "may be used" Date: Sun, 17 Dec 2023 04:40:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: lavr at ncbi dot nlm.nih.gov X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104069 lavr at ncbi dot nlm.nih.gov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lavr at ncbi dot nlm.nih.g= ov --- Comment #35 from lavr at ncbi dot nlm.nih.gov --- I'm still seeing this bogus warning for code as simple as this: if (!(buf =3D (char*) realloc(var, newsize)) { free(var); // THIS LINE GETS A WARNING HERE return 0; } with GCC 13.2: warning: pointer 'var' may be used after 'realloc' [-Wuse-after-free]=