gcj/198: gcj crashes when trying to compile this code!
Mo DeJong
mdejong@cygnus.com
Sun Apr 9 06:00:00 GMT 2000
The following reply was made to PR gcj/198; it has been noted by GNATS.
From: Mo DeJong <mdejong@cygnus.com>
To: java-gnats@sourceware.cygnus.com, apbianco@cygnus.com
Cc:
Subject: Re: gcj/198: gcj crashes when trying to compile this code!
Date: Sun, 9 Apr 2000 05:50:37 -0700 (PDT)
I was able to trim the gcj crasher described in pr 198 to the following.
Could the download like I put up originally be replaced by this?
I did not see any way to change anything in gnats once it was submitted.
// File Regexp.java
import java.util.*;
import java.io.*;
public class Regexp
{
public interface Filter
{
public boolean filter(Object rs, StringBuffer sb);
}
private static class SubspecFilter implements Filter
{
public boolean
filter(Object rs, StringBuffer sb)
{
return true;
}
}
static class Compiler {}
static class Match {
// Whats odd is that the core dump changes location
// if you coment out the following method!
void regtry(int off) {}
}
}
The GDB info is the same.
(gdb) bt
#0 lookup_do (searched_class=0x8272ba8, searched_interface=0x82919b4,
method_name=0x8291be4, signature=0x8291d04,
signature_builder=0x8079fac <build_java_argument_signature>)
at ../../../egcs/gcc/java/typeck.c:784
#1 0x807a448 in lookup_argument_method2 (searched_class=0x82919b4,
method_name=0x8291be4, method_signature=0x8291d04)
at ../../../egcs/gcc/java/typeck.c:733
#2 0x805b578 in java_check_regular_methods (class_decl=0x8291a70) at
./parse.y:5927
#3 0x805d870 in java_layout_classes () at ./parse.y:7159
#4 0x805f65d in java_expand_classes () at ./parse.y:8245
#5 0x807fdc2 in yyparse () at ../../../egcs/gcc/java/jcf-parse.c:897
#6 0x8089312 in compile_file (name=0xbffff8f4 "Regexp.java")
at ../../egcs/gcc/toplev.c:2391
#7 0x808c254 in main (argc=2, argv=0xbffff794) at
../../egcs/gcc/toplev.c:4667
(gdb) list
779
780 for (i = interface_len; i > 0; i--)
781 {
782 tree child =
783 TREE_VEC_ELT (TYPE_BINFO_BASETYPES
(searched_interface), i);
784 tree iclass = BINFO_TYPE (child);
785
786 /* If the superinterface hasn't been loaded yet, do so
now. */
787 if (CLASS_FROM_SOURCE_P (iclass))
788 safe_layout_class (iclass);
(gdb) print child
$1 = (union tree_node *) 0x0
Mo Dejong
Red Hat Inc.
More information about the Java-prs
mailing list