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++/101210] [9/10 regression] spurious "reference binding to misaligned address" ubsan error for integer comparison Date: Wed, 11 May 2022 06:21:04 +0000 [thread overview] Message-ID: <bug-101210-4-8XPHiSGkVo@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101210-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101210 --- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:57aeb7f535b9c04ed34ab9479498143ee73fb568 commit r9-10085-g57aeb7f535b9c04ed34ab9479498143ee73fb568 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Jun 29 11:24:38 2021 +0200 match.pd: Avoid (intptr_t)x eq/ne CST to x eq/ne (typeof x) CST opt in GENERIC when sanitizing [PR101210] When we have (intptr_t) x == cst where x has REFERENCE_TYPE, this optimization creates x == cst out of it where cst has REFERENCE_TYPE. If it is done in GENERIC folding, it can results in ubsan failures where the INTEGER_CST with REFERENCE_TYPE is instrumented. Fixed by deferring it to GIMPLE folding in this case. 2021-06-29 Jakub Jelinek <jakub@redhat.com> PR c++/101210 * match.pd ((intptr_t)x eq/ne CST to x eq/ne (typeof x) CST): Don't perform the optimization in GENERIC when sanitizing and x has a reference type. * g++.dg/ubsan/pr101210.C: New test. (cherry picked from commit 53fd7544aff6d0a18869017cb9bb921a7f5dcd04)
next prev parent reply other threads:[~2022-05-11 6:21 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-25 14:11 [Bug c++/101210] New: [7/8/9/10/11/12 " jlegg at feralinteractive dot com 2021-06-25 16:50 ` [Bug c++/101210] [9/10/11/12 " jakub at gcc dot gnu.org 2021-06-28 7:37 ` jakub at gcc dot gnu.org 2021-06-28 8:18 ` jakub at gcc dot gnu.org 2021-06-28 8:20 ` marxin at gcc dot gnu.org 2021-06-28 8:22 ` jakub at gcc dot gnu.org 2021-06-28 8:27 ` marxin at gcc dot gnu.org 2021-06-29 9:25 ` cvs-commit at gcc dot gnu.org 2021-06-29 9:50 ` [Bug c++/101210] [9/10/11 " jakub at gcc dot gnu.org 2021-07-18 23:28 ` cvs-commit at gcc dot gnu.org 2021-07-19 7:55 ` [Bug c++/101210] [9/10 " jakub at gcc dot gnu.org 2022-05-10 8:19 ` cvs-commit at gcc dot gnu.org 2022-05-11 6:21 ` cvs-commit at gcc dot gnu.org [this message] 2022-05-11 6:36 ` jakub 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-101210-4-8XPHiSGkVo@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).