[kaffe] the terrible segmentation fault
程明
cheng-m03 at mails.tsinghua.edu.cn
Wed Nov 3 02:09:42 PST 2004
Hi,everyone,
I have two problems:
1.When I run my ported Kaffe on THUMP 107, Kaffe runs into the
initBaseClasses() function of baseClasses.c, each execution of
loadStaticClass(&javaLangDoubleClass, "java/lang/Double");
loadStaticClass(&javaLangVMThrowable, "java/lang/VMThrowable");
loadStaticClass(&javaLangNoClassDefFoundError,
"java/lang/NoClassDefFoundError");
loadStaticClass(&javaLangStackOverflowError,
"java/lang/StackOverflowError");
can cause a segmentation fault, and the kernel aborts kaffe.
And I notice that the execution of Line 127 & 128 in readClass.c causes
the segmentation fault.
sizeof(Hjava_lang_Class**) * interfaces_count is 4 when loading
java.lang.Float
sizeof(Hjava_lang_Class**) * interfaces_count is also 4 when loading
java.lang.Double. Then segmentation fault occurs. Is it because 4 is not
enough for java.lang.Double?
I would like to know why other classes don't cause segmentation fault
but those 4 classes. Are there any differences?
2.After I put those 4 lines into /* */, another segmentation fault
occurs. This time the segmentation fault occurs at
processClass(StringClass, CSTATE_COMPLETE, &einfo)
in baseClasses.c.
And one of my PCs which is 80X86-Linux platform causes a segmentation
fault at the same place but another one doesn't. Maybe this function
contains a bug.
Best wishes,
Cheng Ming
More information about the kaffe
mailing list