public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109123] Bogus warning: pointer used after 'realloc' -Wuse-after-free with -O2 Date: Thu, 16 Mar 2023 07:30:36 +0000 [thread overview] Message-ID: <bug-109123-4-eq2SBESFPU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109123-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109123 --- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:0a07bfad12530bca5dc5188057ad910198780dbc commit r13-6707-g0a07bfad12530bca5dc5188057ad910198780dbc Author: Richard Biener <rguenther@suse.de> Date: Wed Mar 15 09:12:33 2023 +0100 tree-optimization/109123 - run -Wuse-afer-free only early The following switches the -Wuse-after-free diagnostics from emitted during the late access warning passes to the early access warning passes to make sure we run before passes performing code motion run which are the source of a lot of false positives on use-after-free not involving memory operations. The patch also fixes an issue in c-c++-common/Wuse-after-free-6.c and causes the name of the unused pointer to appear in the diagnostic for extra cases in gcc.dg/Wuse-after-free-2.c PR tree-optimization/109123 * gimple-ssa-warn-access.cc (pass_waccess::warn_invalid_pointer): Do not emit -Wuse-after-free late. (pass_waccess::check_call): Always check call pointer uses. * gcc.dg/Wuse-after-free-pr109123.c: New testcase. * gcc.dg/Wuse-after-free-2.c: Amend expected diagnostic with the name of the pointer. * c-c++-common/Wuse-after-free-6.c: Un-XFAIL case.
next prev parent reply other threads:[~2023-03-16 7:30 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-14 9:41 [Bug c/109123] New: Bogus warning: pointer used after 'realloc' -Wuse-after-free manu at gcc dot gnu.org 2023-03-14 9:44 ` [Bug c/109123] Bogus warning: pointer used after 'realloc' -Wuse-after-free with -O2 manu at gcc dot gnu.org 2023-03-14 9:48 ` manu at gcc dot gnu.org 2023-03-14 9:55 ` rguenth at gcc dot gnu.org 2023-03-14 10:00 ` manu at gcc dot gnu.org 2023-03-14 10:03 ` manu at gcc dot gnu.org 2023-03-14 10:22 ` manu at gcc dot gnu.org 2023-03-14 12:17 ` rguenth at gcc dot gnu.org 2023-03-14 12:51 ` manu at gcc dot gnu.org 2023-03-15 8:16 ` rguenth at gcc dot gnu.org 2023-03-16 7:30 ` cvs-commit at gcc dot gnu.org [this message] 2023-03-16 7:31 ` [Bug c/109123] [12 Regression] " rguenth at gcc dot gnu.org 2023-05-08 12:26 ` [Bug tree-optimization/109123] " rguenth at gcc dot gnu.org
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=bug-109123-4-eq2SBESFPU@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe 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).