This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
java/3596: jc1 crash with final synchronized methods (duplicate_eh_regions)
- To: gcc-gnats at gcc dot gnu dot org
- Subject: java/3596: jc1 crash with final synchronized methods (duplicate_eh_regions)
- From: Anthony Green <green at cygnus dot com>
- Date: Fri, 6 Jul 2001 11:34:40 -0700
>Number: 3596
>Category: java
>Synopsis: jc1 crash with final synchronized methods (duplicate_eh_regions)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Fri Jul 06 11:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Anthony Green
>Release: 3.1 20010705 (experimental)
>Organization:
>Environment:
System: Linux fencer.cygnus.com 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-language=c,c++,java --enable-threads --prefix=/horton/green/net/i : (reconfigured)
>Description:
jc1 is dying in duplicate_eh_regions when attempting to inline
final synchronized methods (inlining is enabled by default, even at
low optimization levels, for final methods). Work around is to
compile with -fno-inline. Here's a stack trace:
Program received signal SIGSEGV, Segmentation fault.
0x80bdd36 in duplicate_eh_regions (ifun=0x845c878, map=0x845c368)
at ../../gcc/gcc/except.c:1447
1447 if (n_array[i]->outer == NULL)
(gdb) where
#0 0x80bdd36 in duplicate_eh_regions (ifun=0x845c878, map=0x845c368)
at ../../gcc/gcc/except.c:1447
#1 0x81545c5 in expand_inline_function (fndecl=0x401162d8, parms=0x4012e230,
target=0x4012ffe0, ignore=0, type=0x40110820, structure_value_addr=0x0)
at ../../gcc/gcc/integrate.c:1187
#2 0x80a89b0 in try_to_integrate (fndecl=0x401162d8, actparms=0x4012e230,
target=0x4012ffe0, ignore=0, type=0x40110820, structure_value_addr=0x0)
at ../../gcc/gcc/calls.c:1799
#3 0x80a913e in expand_call (exp=0x40118da0, target=0x4012ffe0, ignore=0)
at ../../gcc/gcc/calls.c:2281
#4 0x80d5cdf in expand_expr (exp=0x40118da0, target=0x4012ffe0, tmode=SImode,
modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:7425
#5 0x80ccfa0 in store_expr (exp=0x401308a0, target=0x4012ffe0, want_value=0)
at ../../gcc/gcc/expr.c:4176
#6 0x80d2c1e in expand_expr (exp=0x401308c0, target=0x4012ffd0, tmode=SImode,
modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:6527
#7 0x81aad84 in expand_return (retval=0x401308e0) at ../../gcc/gcc/stmt.c:3113
#8 0x80dc45d in expand_expr (exp=0x4010fd48, target=0x0, tmode=VOIDmode,
modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:8584
#9 0x80d2809 in expand_expr (exp=0x40118dc0, target=0x0, tmode=VOIDmode,
modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:6455
#10 0x808b7ff in java_lang_expand_expr (exp=0x40118d60, target=0x0,
tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../gcc/gcc/java/expr.c:2452
#11 0x80dd12a in expand_expr (exp=0x40130a20, target=0x0, tmode=VOIDmode,
modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:8855
#12 0x80d5a29 in expand_expr (exp=0x4012e2bc, target=0x0, tmode=VOIDmode,
modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:7402
#13 0x81a90a1 in expand_expr_stmt (exp=0x4012e2bc) at ../../gcc/gcc/stmt.c:1948
#14 0x805e88f in source_end_java_method () at ../../gcc/gcc/java/parse.y:7197
#15 0x805ff98 in java_complete_expand_method (mdecl=0x40116548)
at ../../gcc/gcc/java/parse.y:7813
#16 0x805f1ef in java_complete_expand_methods (class_decl=0x401160d0)
at ../../gcc/gcc/java/parse.y:7491
#17 0x805eee8 in java_complete_expand_class (outer=0x401160d0)
at ../../gcc/gcc/java/parse.y:7402
#18 0x805ee5c in java_complete_expand_classes ()
at ../../gcc/gcc/java/parse.y:7380
#19 0x80625bd in java_expand_classes () at ../../gcc/gcc/java/parse.y:8693
#20 0x8099f66 in yyparse () at ../../gcc/gcc/java/jcf-parse.c:1152
#21 0x81b621a in compile_file (name=0xbffffa09 "duplicate_eh_regions.java")
at ../../gcc/gcc/toplev.c:2337
#22 0x81ba0ea in toplev_main (argc=3, argv=0xbffff864)
at ../../gcc/gcc/toplev.c:4999
#23 0x80a6628 in main (argc=3, argv=0xbffff864) at ../../gcc/gcc/main.c:34
>How-To-Repeat:
Compile the following with "gcj -c -O1 duplicate_eh_regions.java"...
public class duplicate_eh_regions {
public final synchronized String addPattern(int options)
{
return null;
}
public final synchronized String addPattern()
{
return addPattern(0);
}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: