PATCH: Fix EH breakage on mainline

Bryce McKinlay
Fri May 28 01:40:00 GMT 2004

Java is currently completely broken on mainline (i686). The libgcj 
runtime is crashing during startup due to EH problems. It appears to be 
due to the following patches:

2004-05-27  Jan Hubicka  <>

    * (UNSPECV_EH_RETURN): Kill.
    (eh_return): Use jump_insn.
    (eh_return_si, eh_return_di): Change pattern to jump instruction.

2004-05-26  Jan Hubicka  <>

    * except.c (can_throw_internal):  Notice RESX instructions.

Honza: please remember to test all such patches (make check) with a 
Java-enabled tree.

This patch reverts those patches and returns Java to a working state.  
After reverting, there is still a new Java testsuite failure which is 
probably also related:

FAIL: PR4766 -O3 compilation from source

Program received signal SIGSEGV, Segmentation fault.
unchecked_make_edge (src=0xbf225740, dst=0x0, flags=-1088388416) at 
284       e->pred_next = dst->pred;
(gdb) bt
#0  unchecked_make_edge (src=0xbf225740, dst=0x0, flags=-1088388416)
    at ../../gcc/cfg.c:284
#1  0x0817aa20 in cached_make_edge (edge_cache=0x0, src=0xbf225740, 
dst=0x0, flags=10)
    at ../../gcc/cfg.c:332
#2  0x0817aa97 in make_edge (src=0xbf2082ec, dest=0xbf2082ec, 
    at ../../gcc/cfg.c:346
#3  0x080ee30d in make_eh_edge (region=0xbf2082ec, data=0xbf22d084)
    at ../../gcc/tree-eh.c:1644
#4  0x081ce7cf in add_reachable_handler (info=0xbff13ea0, 
lp_region=Variable "lp_region"
is not available.
    at ../../gcc/except.c:2827
#5  0x081ce80c in reachable_next_level (region=0xbf2225c0, type_thrown=0x0,
    info=0xbff13ea0) at ../../gcc/except.c:2964
#6  0x081ceabb in foreach_reachable_handler (region_number=2, 
    callback=0xbf2082ec, callback_data=0xbf2082ec) at 
#7  0x080ee37c in make_eh_edges (stmt=0xbf22d084) at 
#8  0x080e7f49 in make_edges () at ../../gcc/tree-cfg.c:559
#9  0x080e96e4 in execute_build_cfg () at ../../gcc/tree-cfg.c:173
#10 0x080f4de9 in execute_pass_list (pass=0x84ff280) at 
#11 0x080f4e50 in execute_pass_list (pass=0x84ff480) at 
#12 0x080f5157 in tree_rest_of_compilation (fndecl=0xbf2ad000, 
    at ../../gcc/tree-optimize.c:530
#13 0x080a64c7 in java_expand_body (fndecl=0xbf2082ec) at 
#14 0x083f7d3d in cgraph_expand_function (node=0xbf22e5e4) at 
#15 0x083f8b3f in cgraph_optimize () at ../../gcc/cgraphunit.c:1668
#16 0x080c492b in java_parse_file (set_yydebug=0) at 
#17 0x083a44ab in toplev_main (argc=3206578924, argv=0xbff143a4)
    at ../../gcc/toplev.c:165



-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-revert-eh.patch
Type: text/x-patch
Size: 2747 bytes
Desc: not available
URL: <>

More information about the Gcc-patches mailing list