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 tree-optimization/104475] [12/13 Regression] Wstringop-overflow + atomics incorrect warning on dynamic object Date: Tue, 06 Dec 2022 10:22:12 +0000 [thread overview] Message-ID: <bug-104475-4-YROq8a5LvA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104475-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104475 --- Comment #17 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:926f5059bb8d295e2b68cea7c9af53606946eb1a commit r13-4503-g926f5059bb8d295e2b68cea7c9af53606946eb1a Author: Richard Biener <rguenther@suse.de> Date: Tue Dec 6 10:12:01 2022 +0100 tree-optimization/104475 - improve access diagnostics When we end up isolating a nullptr path it happens we diagnose accesses to offsetted nullptr objects. The current diagnostics have no good indication that this happens so the following records the fact that our heuristic detected a nullptr based access in the access_ref structure and sets up diagnostics to inform of that detail. The diagnostic itself could probably be improved here but its API is twisted and the necessary object isn't passed around. Instead of just ...bits/atomic_base.h:655:34: warning: 'unsigned int __atomic_fetch_and_4(volatile void*, unsigned int, int)' writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=] we now add In member function 'void QFutureInterfaceBase::setThrottled(bool)': cc1plus: note: destination object is likely at address zero PR tree-optimization/104475 * pointer-query.h (access_ref::ref_nullptr_p): New flag. * pointer-query.cc (access_ref::access_ref): Initialize ref_nullptr_p. (compute_objsize_r): Set ref_nullptr_p if we treat it that way. (access_ref::inform_access): If ref was treated as nullptr based, indicate that.
next prev parent reply other threads:[~2022-12-06 10:22 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-09 19:37 [Bug c++/104475] New: " thiago at kde dot org 2022-02-09 20:14 ` [Bug tree-optimization/104475] [12 Regression] " pinskia at gcc dot gnu.org 2022-02-09 23:48 ` msebor at gcc dot gnu.org 2022-02-16 14:56 ` jakub at gcc dot gnu.org 2022-03-03 14:00 ` aldyh at gcc dot gnu.org 2022-03-03 16:09 ` amacleod at redhat dot com 2022-03-03 17:55 ` amacleod at redhat dot com 2022-03-04 14:47 ` amacleod at redhat dot com 2022-03-09 13:13 ` rguenth at gcc dot gnu.org 2022-03-12 9:39 ` aldyh at gcc dot gnu.org 2022-03-23 12:47 ` rguenth at gcc dot gnu.org 2022-03-23 17:23 ` aldyh at gcc dot gnu.org 2022-05-06 8:32 ` [Bug tree-optimization/104475] [12/13 " jakub at gcc dot gnu.org 2022-07-26 12:59 ` rguenth at gcc dot gnu.org 2022-12-05 15:50 ` rguenth at gcc dot gnu.org 2022-12-05 16:36 ` thiago at kde dot org 2022-12-06 8:17 ` rguenth at gcc dot gnu.org 2022-12-06 9:11 ` rguenth at gcc dot gnu.org 2022-12-06 10:22 ` cvs-commit at gcc dot gnu.org [this message] 2022-12-06 10:26 ` rguenth at gcc dot gnu.org 2022-12-06 18:03 ` thiago at kde dot org 2022-12-07 9:46 ` rguenth at gcc dot gnu.org 2022-12-07 9:48 ` rguenth at gcc dot gnu.org 2022-12-07 9:49 ` rguenth at gcc dot gnu.org 2022-12-07 9:54 ` rguenth at gcc dot gnu.org 2022-12-07 11:25 ` rguenth at gcc dot gnu.org 2023-01-17 17:37 ` jason at gcc dot gnu.org 2023-05-08 12:23 ` [Bug tree-optimization/104475] [12/13/14 " rguenth at gcc dot gnu.org 2023-09-18 9:19 ` aph at gcc dot gnu.org 2023-09-18 10:04 ` 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-104475-4-YROq8a5LvA@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).