From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 190E3385703B; Mon, 26 Oct 2020 08:05:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 190E3385703B From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap Date: Mon, 26 Oct 2020 08:05:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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: everconfirmed cf_reconfirmed_on bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 08:05:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97554 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2020-10-26 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Richard Biener --- Confirmed. We're doing #1 0x0000000002343be5 in alloc_cprop_mem (n_blocks=3D249747, n_sets=3D1374= 35) at /home/rguenther/src/gcc2/gcc/cprop.c:557 557 cprop_avloc =3D sbitmap_vector_alloc (n_blocks, n_sets); where sbitmap_vector_alloc continues to use 'int' for things like size: 139 sbitmap * 140 sbitmap_vector_alloc (unsigned int n_vecs, unsigned int n_elms) 141 { 142 unsigned int i, bytes, offset, elm_bytes, size, amt, vector_bytes; 143 sbitmap *bitmap_vector; 144 and eventually 'amt' overflows: amt =3D vector_bytes + (n_vecs * elm_bytes); (gdb) p vector_bytes $8 =3D 1997976 (gdb) p n_vecs $9 =3D 249747 (gdb) p elm_bytes $10 =3D 17192 (gdb) p amt $11 =3D 681104 I'll fix that part.=