public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/105969] [12/13 Regression] ICE in Floating point exception Date: Wed, 15 Jun 2022 08:50:00 +0000 [thread overview] Message-ID: <bug-105969-4-SfdJyTUIoN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105969-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105969 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Last reconfirmed| |2022-06-15 Target Milestone|--- |12.2 Keywords| |accepts-invalid, | |needs-bisection Ever confirmed|0 |1 CC| |jsm28 at gcc dot gnu.org Blocks| |105604 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. (gdb) l 2317 2318 unsigned HOST_WIDE_INT byteoff = idx * elbytes; 2319 2320 if (byteoff < HOST_WIDE_INT_MAX 2321 && elbytes < HOST_WIDE_INT_MAX 2322 && byteoff / elbytes == idx) 2323 { 2324 /* For in-bounds constant offsets into constant-sized arrays 2325 bump up *OFF, and for what's likely arrays or structs of 2326 arrays, also *FLDOFF, as necessary. */ (gdb) p elbytes $1 = 0 I think this testcase should probably be rejected given we have b with an array element size of zero which means elements overlap. Joseph? The ICE can be mitigated by reworking the byteoff / elbytes == idx check which seems to be looking for whether the byteoff computation overflowed? (but we don't check whether *off += byteoff overflows). The overflow checking can be preserved by doing elbytes == 0 || byteoff / elbytes == idx. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105604 [Bug 105604] [10/11 Regression] ICE: in tree_to_shwi with vla in struct and sprintf
next prev parent reply other threads:[~2022-06-15 8:50 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-14 10:23 [Bug c/105969] New: " gscfq@t-online.de 2022-06-15 8:50 ` rguenth at gcc dot gnu.org [this message] 2022-06-15 11:15 ` [Bug c/105969] " cvs-commit at gcc dot gnu.org 2022-06-15 15:57 ` [Bug c/105969] [12 " joseph at codesourcery dot com 2022-07-15 8:58 ` [Bug c/105969] [12 Regression] ICE in Floating point exception since r13-750-g10d1986aee47c5 marxin at gcc dot gnu.org 2022-07-19 11:38 ` cvs-commit at gcc dot gnu.org 2022-07-19 11:39 ` 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-105969-4-SfdJyTUIoN@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).