public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
@ 2004-06-21 13:00 bonniot at users dot sf dot net
  2004-06-21 13:02 ` [Bug java/16113] " bonniot at users dot sf dot net
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: bonniot at users dot sf dot net @ 2004-06-21 13:00 UTC (permalink / raw)
  To: java-prs

If I compile the attached class rawArray with javac -g, and then compile the
bytecode using gcj (3.5.0 20040613 from Debian gcc-snapshot), I get:
rawArray.java: In class `rawArray':
rawArray.java: In method `rawArray.gconvert()':
rawArray.java:10: internal compiler error: Segmentation fault

No error without the -g option to javac, or if I use gcj 3.3.4, so this is a
regression.

-- 
           Summary: ICE: Segmentation fault when compiling bytecode with
                    debugging info and try/catch
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonniot at users dot sf dot net
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
  GCC host triplet: i386-debian-linux-gnu


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


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

* [Bug java/16113] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
@ 2004-06-21 13:02 ` bonniot at users dot sf dot net
  2004-06-21 13:51 ` bonniot at users dot sf dot net
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bonniot at users dot sf dot net @ 2004-06-21 13:02 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From bonniot at users dot sf dot net  2004-06-21 13:00 -------
Created an attachment (id=6589)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6589&action=view)
Source file


-- 


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


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

* [Bug java/16113] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
  2004-06-21 13:02 ` [Bug java/16113] " bonniot at users dot sf dot net
@ 2004-06-21 13:51 ` bonniot at users dot sf dot net
  2004-06-21 16:19 ` rmathew at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bonniot at users dot sf dot net @ 2004-06-21 13:51 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From bonniot at users dot sf dot net  2004-06-21 13:02 -------
Created an attachment (id=6590)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6590&action=view)
Offending bytecode

ICE results of:

PATH=/usr/lib/gcc-snapshot/bin:$PATH
LD_LIBRARY_PATH=/usr/lib/gcc-snapshot/lib:$LD_LIBRARY_PATH gcj rawArray.class


-- 


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


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

* [Bug java/16113] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
  2004-06-21 13:02 ` [Bug java/16113] " bonniot at users dot sf dot net
  2004-06-21 13:51 ` bonniot at users dot sf dot net
@ 2004-06-21 16:19 ` rmathew at gcc dot gnu dot org
  2004-06-21 19:58 ` [Bug java/16113] [3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-06-21 16:19 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2004-06-21 13:51 -------
With the current mainline, here's the backtrace:

(gdb) bt
#0  expand_end_bindings (vars=0x0, mark_ends=1, dont_jump_in=0)
    at /home/ranmath/src/gcc/gcc-20040621/gcc/stmt.c:3085
#1  0x08073a0d in force_poplevels (start_pc=0)
    at /home/ranmath/src/gcc/gcc-20040621/gcc/java/decl.c:1545
#2  0x0807f364 in maybe_end_try (start_pc=0, end_pc=3)
    at /home/ranmath/src/gcc/gcc-20040621/gcc/java/except.c:437
#3  0x08073a84 in maybe_poplevels (pc=3)
    at /home/ranmath/src/gcc/gcc-20040621/gcc/java/decl.c:1528
#4  0x0807b278 in expand_byte_code (jcf=0xb75e9840, method=0x0)
    at /home/ranmath/src/gcc/gcc-20040621/gcc/java/expr.c:2925
#5  0x08083c63 in parse_class_file ()
    at /home/ranmath/src/gcc/gcc-20040621/gcc/java/jcf-parse.c:802
#6  0x080860ed in java_parse_file (set_yydebug=0)
    at /home/ranmath/src/gcc/gcc-20040621/gcc/java/jcf-parse.c:1127
#7  0x082deda0 in toplev_main (argc=0, argv=0xbfffcbc4)
    at /home/ranmath/src/gcc/gcc-20040621/gcc/toplev.c:961
#8  0xb74b1768 in __libc_start_main () from /lib/tls/libc.so.6
#9  0x08049c01 in _start ()


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-21 13:51:09
               date|                            |


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


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

* [Bug java/16113] [3.5 Regression] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
                   ` (2 preceding siblings ...)
  2004-06-21 16:19 ` rmathew at gcc dot gnu dot org
@ 2004-06-21 19:58 ` pinskia at gcc dot gnu dot org
  2004-06-22 11:39 ` aph at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-21 19:58 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-21 16:19 -------
This is called the java front-end still using some expand parts when it should not be.  I saw it on 
another file myself recently but I cannot remember which bug it was from.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|2004-06-21 13:51:09         |2004-06-21 16:19:57
               date|                            |
            Summary|ICE: Segmentation fault when|[3.5 Regression] ICE:
                   |compiling bytecode with     |Segmentation fault when
                   |debugging info and try/catch|compiling bytecode with
                   |                            |debugging info and try/catch
   Target Milestone|---                         |3.5.0


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


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

* [Bug java/16113] [3.5 Regression] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
                   ` (3 preceding siblings ...)
  2004-06-21 19:58 ` [Bug java/16113] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-06-22 11:39 ` aph at gcc dot gnu dot org
  2004-06-22 11:44 ` rmathew at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: aph at gcc dot gnu dot org @ 2004-06-22 11:39 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From aph at gcc dot gnu dot org  2004-06-22 10:23 -------
This might be as simple as removing the call to expand_end_bindings() from
force_poplevels().

-- 


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


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

* [Bug java/16113] [3.5 Regression] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
                   ` (4 preceding siblings ...)
  2004-06-22 11:39 ` aph at gcc dot gnu dot org
@ 2004-06-22 11:44 ` rmathew at gcc dot gnu dot org
  2004-06-22 11:49 ` rmathew at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-06-22 11:44 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2004-06-22 11:39 -------
(In reply to comment #5)
> This might be as simple as removing the call to expand_end_bindings() from
> force_poplevels().

Indeed! I removed this call, rebuilt libgcj and reran the testsuite (including
Jacks) and there were no regressions (only the two "err6" failures that are
anyway seen on mainline today).

FWIW, here's the "expand_*" usage in the GCJ front end:
------------------------------ 8< ------------------------------
expr.c:      expand_eh_region_start ();
expr.c:      expand_start_all_catch ();
expr.c:   expand_start_catch (prepare_eh_table_type (type));
expr.c:   expand_end_catch ();
expr.c:      expand_end_all_catch ();
expr.c: expand_decl (array_decl);
expr.c:       expand_decl (pushdecl (local));
expr.c: tmp = expand_assignment (array_decl,
expr.c: expand_assignment (build (COMPONENT_REF, TREE_TYPE (data_fld),
class.c:      expand_function_start (init_decl, 0);
resource.c:  expand_function_start (init_decl, 0);
class.c:      expand_function_end ();
resource.c:  expand_function_end ();
expr.c:  expand_goto (target_label);
expr.c:  expand_goto (target_label);
expr.c:      expand_expr_stmt (TREE_OPERAND (exp, 0));
expr.c:   expand_expr_stmt (TREE_OPERAND (current, 0));
expr.c:  expand_expr_stmt (build (MODIFY_EXPR, boolean_type_node,
expr.c:   expand_end_bindings (getdecls (), 1, 0);
expr.c: expand_decl (array_decl);
expr.c:       expand_decl (pushdecl (local));
------------------------------ 8< ------------------------------

Should these be removed/replaced as well?

-- 


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


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

* [Bug java/16113] [3.5 Regression] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
                   ` (5 preceding siblings ...)
  2004-06-22 11:44 ` rmathew at gcc dot gnu dot org
@ 2004-06-22 11:49 ` rmathew at gcc dot gnu dot org
  2004-06-22 13:02 ` aph at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-06-22 11:49 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2004-06-22 11:44 -------
(In reply to comment #6)
> (In reply to comment #5)
> > This might be as simple as removing the call to expand_end_bindings() from
> > force_poplevels().
> 
> Indeed! I removed this call, rebuilt libgcj and reran the testsuite (including
> Jacks) and there were no regressions (only the two "err6" failures that are
> anyway seen on mainline today).

...and this fixes the reported ICE as well. (Sorry, should have mentioned this.)

-- 


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


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

* [Bug java/16113] [3.5 Regression] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
                   ` (6 preceding siblings ...)
  2004-06-22 11:49 ` rmathew at gcc dot gnu dot org
@ 2004-06-22 13:02 ` aph at gcc dot gnu dot org
  2004-06-22 13:55 ` rmathew at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: aph at gcc dot gnu dot org @ 2004-06-22 13:02 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From aph at gcc dot gnu dot org  2004-06-22 12:25 -------
Yes, all the calls to the front end expanders should be removed.
Most of this can be achieved simply by deleting java_expand_expr().

There are a few cases that need to be rewritten for tree-SSA.  resource.c, for
example.  Also, emit_register_classes() should be converted.  These still work
because the old interface to the back end still works, kinda sorta.

-- 


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


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

* [Bug java/16113] [3.5 Regression] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
                   ` (7 preceding siblings ...)
  2004-06-22 13:02 ` aph at gcc dot gnu dot org
@ 2004-06-22 13:55 ` rmathew at gcc dot gnu dot org
  2004-06-22 18:35 ` cvs-commit at gcc dot gnu dot org
  2004-06-22 18:39 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-06-22 13:55 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2004-06-22 13:54 -------
Proposed patch is here:

  http://gcc.gnu.org/ml/java-patches/2004-q2/msg00743.html

(In reply to comment #8)
> Yes, all the calls to the front end expanders should be removed.
> Most of this can be achieved simply by deleting java_expand_expr().

I did that and it didn't create any problems:

  http://gcc.gnu.org/ml/java-patches/2004-q2/msg00744.html


> There are a few cases that need to be rewritten for tree-SSA.  resource.c, for
> example.  Also, emit_register_classes() should be converted.  These still work
> because the old interface to the back end still works, kinda sorta.

I've created PR16138 to help us track this issue.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug java/16113] [3.5 Regression] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
                   ` (8 preceding siblings ...)
  2004-06-22 13:55 ` rmathew at gcc dot gnu dot org
@ 2004-06-22 18:35 ` cvs-commit at gcc dot gnu dot org
  2004-06-22 18:39 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-22 18:35 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-22 18:22 -------
Subject: Bug 16113

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rmathew@gcc.gnu.org	2004-06-22 18:22:43

Modified files:
	gcc/java       : ChangeLog decl.c 

Log message:
	Fixes PR java/16113.
	* decl.c (force_poplevels): Remove call to expand_end_bindings.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1385&r2=1.1386
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/decl.c.diff?cvsroot=gcc&r1=1.182&r2=1.183



-- 


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


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

* [Bug java/16113] [3.5 Regression] ICE: Segmentation fault when compiling bytecode with debugging info and try/catch
  2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
                   ` (9 preceding siblings ...)
  2004-06-22 18:35 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-22 18:39 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-22 18:39 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-22 18:35 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-06-22 18:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-21 13:00 [Bug java/16113] New: ICE: Segmentation fault when compiling bytecode with debugging info and try/catch bonniot at users dot sf dot net
2004-06-21 13:02 ` [Bug java/16113] " bonniot at users dot sf dot net
2004-06-21 13:51 ` bonniot at users dot sf dot net
2004-06-21 16:19 ` rmathew at gcc dot gnu dot org
2004-06-21 19:58 ` [Bug java/16113] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-06-22 11:39 ` aph at gcc dot gnu dot org
2004-06-22 11:44 ` rmathew at gcc dot gnu dot org
2004-06-22 11:49 ` rmathew at gcc dot gnu dot org
2004-06-22 13:02 ` aph at gcc dot gnu dot org
2004-06-22 13:55 ` rmathew at gcc dot gnu dot org
2004-06-22 18:35 ` cvs-commit at gcc dot gnu dot org
2004-06-22 18:39 ` pinskia at gcc dot gnu dot 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).