public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/48188] New: ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code
@ 2011-03-18 16:19 zsojka at seznam dot cz
  2012-02-02  8:35 ` [Bug rtl-optimization/48188] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2011-03-18 16:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48188

           Summary: ICE: SIGSEGV in remove_unnecessary_regions
                    (ira-build.c:1855) with --param ira-max-loops-num=0 on
                    basic code
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


----- testcase.c -----
void foo (void) { }
----------------------

Compiler output:
$ gcc --param ira-max-loops-num=0 testcase.c
==13273== Use of uninitialised value of size 8
==13273==    at 0x792776: remove_unnecessary_regions (ira-build.c:1855)
==13273==    by 0x794213: ira_build (ira-build.c:2994)
==13273==    by 0x78D4DE: ira (ira.c:3175)
==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
==13273==    by 0xB110B9: cgraph_finalize_compilation_unit (cgraphunit.c:1096)
==13273==    by 0x509113: c_write_global_declarations (c-decl.c:9872)
==13273==  Uninitialised value was created by a heap allocation
==13273==    at 0x4C26F30: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13273==    by 0x10BD427: xmalloc (xmalloc.c:147)
==13273==    by 0x79264C: remove_unnecessary_regions (ira-build.c:1835)
==13273==    by 0x794213: ira_build (ira-build.c:2994)
==13273==    by 0x78D4DE: ira (ira.c:3175)
==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
==13273== 
==13273== Invalid write of size 1
==13273==    at 0x792776: remove_unnecessary_regions (ira-build.c:1855)
==13273==    by 0x794213: ira_build (ira-build.c:2994)
==13273==    by 0x78D4DE: ira (ira.c:3175)
==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
==13273==    by 0xB110B9: cgraph_finalize_compilation_unit (cgraphunit.c:1096)
==13273==    by 0x509113: c_write_global_declarations (c-decl.c:9872)
==13273==  Address 0x3c is not stack'd, malloc'd or (recently) free'd
==13273== 
testcase.c: In function 'foo':
testcase.c:1:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/48188] ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code
  2011-03-18 16:19 [Bug rtl-optimization/48188] New: ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code zsojka at seznam dot cz
@ 2012-02-02  8:35 ` pinskia at gcc dot gnu.org
  2013-04-05  6:00 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-02  8:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48188

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-02 08:34:57 UTC ---
This works for me on the trunk.  maybe fixed by:
2012-01-19  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/40761


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/48188] ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code
  2011-03-18 16:19 [Bug rtl-optimization/48188] New: ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code zsojka at seznam dot cz
  2012-02-02  8:35 ` [Bug rtl-optimization/48188] " pinskia at gcc dot gnu.org
@ 2013-04-05  6:00 ` mpolacek at gcc dot gnu.org
  2015-03-03 19:46 ` zsojka at seznam dot cz
  2021-09-20  9:21 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-04-05  6:00 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48188

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-04-05 06:00:16 UTC ---
Broken only in 4.6.  I think WONTFIX...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/48188] ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code
  2011-03-18 16:19 [Bug rtl-optimization/48188] New: ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code zsojka at seznam dot cz
  2012-02-02  8:35 ` [Bug rtl-optimization/48188] " pinskia at gcc dot gnu.org
  2013-04-05  6:00 ` mpolacek at gcc dot gnu.org
@ 2015-03-03 19:46 ` zsojka at seznam dot cz
  2021-09-20  9:21 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2015-03-03 19:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48188

Zdenek Sojka <zsojka at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-pc-linux-gnu
               Host|                            |x86_64-pc-linux-gnu
      Known to fail|                            |4.8.5, 4.9.3, 5.0

--- Comment #3 from Zdenek Sojka <zsojka at seznam dot cz> ---
Still crashes in trunk. At least -O2 is needed now; or -O1 with valgrind.

$ gcc -O2 --param ira-max-loops-num=0 testcase.c 
testcase.c: In function 'foo':
testcase.c:1:1: internal compiler error: Segmentation fault
 void foo (void) { }
 ^
0xc4a2ff crash_signal
        /mnt/svn/gcc-trunk/gcc/toplev.c:383
0xa81521 mark_loops_for_removal
        /mnt/svn/gcc-trunk/gcc/ira-build.c:2296
0xa81521 remove_unnecessary_regions
        /mnt/svn/gcc-trunk/gcc/ira-build.c:2635
0xa84122 ira_build()
        /mnt/svn/gcc-trunk/gcc/ira-build.c:3462
0xa7bcb4 ira
        /mnt/svn/gcc-trunk/gcc/ira.c:5254
0xa7bcb4 execute
        /mnt/svn/gcc-trunk/gcc/ira.c:5546
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

gcc -O --param ira-max-loops-num=0 testcase.c -wrapper valgrind,-q
==9427== Use of uninitialised value of size 8
==9427==    at 0xA81521: mark_loops_for_removal (ira-build.c:2296)
==9427==    by 0xA81521: remove_unnecessary_regions(bool) (ira-build.c:2635)
==9427==    by 0xA84122: ira_build() (ira-build.c:3462)
==9427==    by 0xA7BCB4: ira (ira.c:5254)
==9427==    by 0xA7BCB4: (anonymous namespace)::pass_ira::execute(function*)
(ira.c:5546)
==9427==    by 0xB53C7E: execute_one_pass(opt_pass*) (passes.c:2328)
==9427==    by 0xB540F5: execute_pass_list_1(opt_pass*) [clone .constprop.73]
(passes.c:2380)
==9427==    by 0xB54107: execute_pass_list_1(opt_pass*) [clone .constprop.73]
(passes.c:2381)
==9427==    by 0xB54148: execute_pass_list(function*, opt_pass*)
(passes.c:2391)
==9427==    by 0x8365FB: cgraph_node::expand() (cgraphunit.c:1878)
==9427==    by 0x837CE8: expand_all_functions (cgraphunit.c:2014)
==9427==    by 0x837CE8: symbol_table::compile() [clone .part.55]
(cgraphunit.c:2367)
==9427==    by 0x839C3F: compile (timevar.h:110)
==9427==    by 0x839C3F: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2444)
==9427==    by 0x6D5A6A: c_write_global_declarations() (c-decl.c:10803)
==9427==    by 0xC4A383: compile_file() (toplev.c:608)
==9427== 
==9427== Invalid write of size 1
==9427==    at 0xA81521: mark_loops_for_removal (ira-build.c:2296)
==9427==    by 0xA81521: remove_unnecessary_regions(bool) (ira-build.c:2635)
==9427==    by 0xA84122: ira_build() (ira-build.c:3462)
==9427==    by 0xA7BCB4: ira (ira.c:5254)
==9427==    by 0xA7BCB4: (anonymous namespace)::pass_ira::execute(function*)
(ira.c:5546)
==9427==    by 0xB53C7E: execute_one_pass(opt_pass*) (passes.c:2328)
==9427==    by 0xB540F5: execute_pass_list_1(opt_pass*) [clone .constprop.73]
(passes.c:2380)
==9427==    by 0xB54107: execute_pass_list_1(opt_pass*) [clone .constprop.73]
(passes.c:2381)
==9427==    by 0xB54148: execute_pass_list(function*, opt_pass*)
(passes.c:2391)
==9427==    by 0x8365FB: cgraph_node::expand() (cgraphunit.c:1878)
==9427==    by 0x837CE8: expand_all_functions (cgraphunit.c:2014)
==9427==    by 0x837CE8: symbol_table::compile() [clone .part.55]
(cgraphunit.c:2367)
==9427==    by 0x839C3F: compile (timevar.h:110)
==9427==    by 0x839C3F: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2444)
==9427==    by 0x6D5A6A: c_write_global_declarations() (c-decl.c:10803)
==9427==    by 0xC4A383: compile_file() (toplev.c:608)
==9427==  Address 0x40 is not stack'd, malloc'd or (recently) free'd
==9427== 
testcase.c: In function 'foo':
testcase.c:1:1: internal compiler error: Segmentation fault
 void foo (void) { }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
(In reply to Zdenek Sojka from comment #0)
> ----- testcase.c -----
> void foo (void) { }
> ----------------------
> 
> Compiler output:
> $ gcc --param ira-max-loops-num=0 testcase.c
> ==13273== Use of uninitialised value of size 8
> ==13273==    at 0x792776: remove_unnecessary_regions (ira-build.c:1855)
> ==13273==    by 0x794213: ira_build (ira-build.c:2994)
> ==13273==    by 0x78D4DE: ira (ira.c:3175)
> ==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
> ==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
> ==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
> ==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
> ==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
> ==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
> ==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
> ==13273==    by 0xB110B9: cgraph_finalize_compilation_unit
> (cgraphunit.c:1096)
> ==13273==    by 0x509113: c_write_global_declarations (c-decl.c:9872)
> ==13273==  Uninitialised value was created by a heap allocation
> ==13273==    at 0x4C26F30: malloc (in
> /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==13273==    by 0x10BD427: xmalloc (xmalloc.c:147)
> ==13273==    by 0x79264C: remove_unnecessary_regions (ira-build.c:1835)
> ==13273==    by 0x794213: ira_build (ira-build.c:2994)
> ==13273==    by 0x78D4DE: ira (ira.c:3175)
> ==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
> ==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
> ==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
> ==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
> ==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
> ==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
> ==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
> ==13273== 
> ==13273== Invalid write of size 1
> ==13273==    at 0x792776: remove_unnecessary_regions (ira-build.c:1855)
> ==13273==    by 0x794213: ira_build (ira-build.c:2994)
> ==13273==    by 0x78D4DE: ira (ira.c:3175)
> ==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
> ==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
> ==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
> ==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
> ==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
> ==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
> ==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
> ==13273==    by 0xB110B9: cgraph_finalize_compilation_unit
> (cgraphunit.c:1096)
> ==13273==    by 0x509113: c_write_global_declarations (c-decl.c:9872)
> ==13273==  Address 0x3c is not stack'd, malloc'd or (recently) free'd
> ==13273== 
> testcase.c: In function 'foo':
> testcase.c:1:1: internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/48188] ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code
  2011-03-18 16:19 [Bug rtl-optimization/48188] New: ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2015-03-03 19:46 ` zsojka at seznam dot cz
@ 2021-09-20  9:21 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-20  9:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48188

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Zdenek Sojka from comment #4)
> Doesn't seem to crash since at least gcc-7

Because it is a dup of bug 71634.

*** This bug has been marked as a duplicate of bug 71634 ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-20  9:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-18 16:19 [Bug rtl-optimization/48188] New: ICE: SIGSEGV in remove_unnecessary_regions (ira-build.c:1855) with --param ira-max-loops-num=0 on basic code zsojka at seznam dot cz
2012-02-02  8:35 ` [Bug rtl-optimization/48188] " pinskia at gcc dot gnu.org
2013-04-05  6:00 ` mpolacek at gcc dot gnu.org
2015-03-03 19:46 ` zsojka at seznam dot cz
2021-09-20  9:21 ` pinskia at gcc dot gnu.org

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).