This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libjava failed to build on Linux/x86


Tom Tromey wrote:

>>>>>>"Tom" == Tom Tromey <tromey@redhat.com> writes:
>>>>>>
>
>Tom> I suspect a non-gcj compiler bug.  I built code with a compiler which
>Tom> was current as of last week sometime.  I imagine some bug was
>Tom> introduced or revealed between then and now.  I've updated and I'm
>Tom> rebuilding to see if I can reproduce the problem here.
>
>I reproduced the crash here.
>I've appended a stack trace.
>The proximate problem is that `e->dest' is 0.
>
>This is really outside my area of expertise.  All I know is that this
>was working fine with the Jan 4 compiler.
>
Are you sure? The bug seems to occur for me going back as far as early 
December. In fact after some binary searching I currently suspect it was 
introduced with this patch:

Mon Dec  3 16:16:37 CET 2001  Jan Hubicka  <jh@suse.cz>

    * gcse.c (delete_null_pointer_checks_1): Do not use delete_list;
    call purge_dead_edges after removing.
    (delete_null_pointer_checks): Do not handle delete_list.

    * cfgbuild.c (inside_basic_block_p, control_flow_insn_p): Break out 
from ...
    (count_basic_blocks): ... here.
    (find_basic_blocks, find_bb_boundaries): Cleanup.

    * stor-layout.c (fixup_signed_type, fixup_unsigned_type): Avoid
    overflow for types greater then 2 * HOST_WIDE_INT.

    * reload.c (find_reloads): Update the duplicates after swapingg.

The bug occurs at -O on x86, and does not occur if -fPIC is used.

Java test case:

class Bug
{
  boolean x = false;

  synchronized void a()
  {
    if (x == true);
  }
}

Stack trace:

Program received signal SIGSEGV, Segmentation fault.
0x08235ad7 in find_unreachable_blocks () at ../../gcc/cfganal.c:363
363             if (!(e->dest->flags & BB_REACHABLE))
(gdb) bt
#0  0x08235ad7 in find_unreachable_blocks () at ../../gcc/cfganal.c:363
#1  0x0823a96c in delete_unreachable_blocks () at 
../../gcc/cfgcleanup.c:1715
#2  0x0823a9f3 in cleanup_cfg (mode=3) at ../../gcc/cfgcleanup.c:1743
#3  0x08200fa6 in rest_of_compilation (decl=0x401a73a0)
    at ../../gcc/toplev.c:3270
#4  0x0805f702 in source_end_java_method () at ../../gcc/java/parse.y:7476
#5  0x0806109e in java_expand_method_bodies (class=0x0)
    at ../../gcc/java/parse.y:8152
#6  0x0806389e in java_expand_classes () at ../../gcc/java/parse.y:9043
#7  0x0809edd1 in yyparse () at ../../gcc/java/jcf-parse.c:1207
#8  0x081ff732 in compile_file () at ../../gcc/toplev.c:2122
#9  0x08204156 in do_compile () at ../../gcc/toplev.c:5177
#10 0x082041b7 in toplev_main (argc=14, argv=0xbffff934)
    at ../../gcc/toplev.c:5209
#11 0x080add27 in main (argc=14, argv=0xbffff934) at ../../gcc/main.c:35

regards

Bryce.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]