* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
@ 2020-10-26 8:05 ` rguenth at gcc dot gnu.org
2020-10-26 10:34 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-26 8:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2020-10-26
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. We're doing
#1 0x0000000002343be5 in alloc_cprop_mem (n_blocks=249747, n_sets=137435)
at /home/rguenther/src/gcc2/gcc/cprop.c:557
557 cprop_avloc = 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 = vector_bytes + (n_vecs * elm_bytes);
(gdb) p vector_bytes
$8 = 1997976
(gdb) p n_vecs
$9 = 249747
(gdb) p elm_bytes
$10 = 17192
(gdb) p amt
$11 = 681104
I'll fix that part.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
2020-10-26 8:05 ` [Bug rtl-optimization/97554] " rguenth at gcc dot gnu.org
@ 2020-10-26 10:34 ` rguenth at gcc dot gnu.org
2020-10-26 17:13 ` rimvydas.jas at gmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-26 10:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
commit 50f9e1f4d458e36d306b2449c689e45492847f68 (HEAD -> trunk, origin/master,
origin/HEAD)
Author: Richard Biener <rguenther@suse.de>
Date: Mon Oct 26 10:10:46 2020 +0100
middle-end/97554 - avoid overflow in alloc size compute
This avoids overflow in the allocation size computations in
sbitmap_vector_alloc when the result exceeds 2GB.
2020-10-26 Richard Biener <rguenther@suse.de>
* sbitmap.c (sbitmap_vector_alloc): Use size_t for byte
quantities to avoid overflow.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
2020-10-26 8:05 ` [Bug rtl-optimization/97554] " rguenth at gcc dot gnu.org
2020-10-26 10:34 ` rguenth at gcc dot gnu.org
@ 2020-10-26 17:13 ` rimvydas.jas at gmail dot com
2020-12-01 10:12 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rimvydas.jas at gmail dot com @ 2020-10-26 17:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
--- Comment #3 from Rimvydas (RJ) <rimvydas.jas at gmail dot com> ---
The g:50f9e1f4d458e36d306b2449c689e45492847f68 applied on top of gcc-10.2
release tarball also allows to compile without segfault in reasonable amount of
time. Could this fix be added to gcc-10 branch for gcc 10.3 release?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
` (2 preceding siblings ...)
2020-10-26 17:13 ` rimvydas.jas at gmail dot com
@ 2020-12-01 10:12 ` rguenth at gcc dot gnu.org
2020-12-01 10:13 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-01 10:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |babokin at gmail dot com
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
*** Bug 82576 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
` (3 preceding siblings ...)
2020-12-01 10:12 ` rguenth at gcc dot gnu.org
@ 2020-12-01 10:13 ` rguenth at gcc dot gnu.org
2020-12-01 10:32 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-01 10:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
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
Status|RESOLVED |ASSIGNED
Resolution|FIXED |---
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Sure, will backport.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
` (4 preceding siblings ...)
2020-12-01 10:13 ` rguenth at gcc dot gnu.org
@ 2020-12-01 10:32 ` cvs-commit at gcc dot gnu.org
2020-12-01 10:50 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-01 10:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:9d769cdde26d87043da0e1ffdee51010a71f49c2
commit r10-9098-g9d769cdde26d87043da0e1ffdee51010a71f49c2
Author: Richard Biener <rguenther@suse.de>
Date: Mon Oct 26 10:10:46 2020 +0100
middle-end/97554 - avoid overflow in alloc size compute
This avoids overflow in the allocation size computations in
sbitmap_vector_alloc when the result exceeds 2GB.
2020-10-26 Richard Biener <rguenther@suse.de>
PR middle-end/97554
* sbitmap.c (sbitmap_vector_alloc): Use size_t for byte
quantities to avoid overflow.
(cherry picked from commit 50f9e1f4d458e36d306b2449c689e45492847f68)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
` (5 preceding siblings ...)
2020-12-01 10:32 ` cvs-commit at gcc dot gnu.org
@ 2020-12-01 10:50 ` cvs-commit at gcc dot gnu.org
2020-12-01 11:02 ` cvs-commit at gcc dot gnu.org
2020-12-01 11:03 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-01 10:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:5005e6c2a8a8cacfd501fed16dc4ce3ee24e8b26
commit r9-9083-g5005e6c2a8a8cacfd501fed16dc4ce3ee24e8b26
Author: Richard Biener <rguenther@suse.de>
Date: Mon Oct 26 10:10:46 2020 +0100
middle-end/97554 - avoid overflow in alloc size compute
This avoids overflow in the allocation size computations in
sbitmap_vector_alloc when the result exceeds 2GB.
2020-10-26 Richard Biener <rguenther@suse.de>
PR middle-end/97554
* sbitmap.c (sbitmap_vector_alloc): Use size_t for byte
quantities to avoid overflow.
(cherry picked from commit 50f9e1f4d458e36d306b2449c689e45492847f68)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
` (6 preceding siblings ...)
2020-12-01 10:50 ` cvs-commit at gcc dot gnu.org
@ 2020-12-01 11:02 ` cvs-commit at gcc dot gnu.org
2020-12-01 11:03 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-01 11:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:46384dc73076d945c9222b3f0850a9aa3e694eda
commit r8-10657-g46384dc73076d945c9222b3f0850a9aa3e694eda
Author: Richard Biener <rguenther@suse.de>
Date: Mon Oct 26 10:10:46 2020 +0100
middle-end/97554 - avoid overflow in alloc size compute
This avoids overflow in the allocation size computations in
sbitmap_vector_alloc when the result exceeds 2GB.
2020-10-26 Richard Biener <rguenther@suse.de>
PR middle-end/97554
* sbitmap.c (sbitmap_vector_alloc): Use size_t for byte
quantities to avoid overflow.
(cherry picked from commit 50f9e1f4d458e36d306b2449c689e45492847f68)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap
2020-10-23 16:34 [Bug rtl-optimization/97554] New: ICE: during RTL pass: cprop /segfault in sbitmap rimvydas.jas at gmail dot com
` (7 preceding siblings ...)
2020-12-01 11:02 ` cvs-commit at gcc dot gnu.org
@ 2020-12-01 11:03 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-01 11:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed everywhere.
^ permalink raw reply [flat|nested] 10+ messages in thread