[kaffe] java.lang.reflect.Method virtual method call bug (CVS)

Helmer Krämer hkraemer at freenet.de
Sat Dec 28 06:33:01 PST 2002


On Sat, 28 Dec 2002 00:55:45 +0100
Benja Fallenstein <b.fallenstein at gmx.de> wrote:

Hi again, Benja.

> >The problem was that kaffe did not choose the
> >correct entry in the dispatch table of the object
> >when calling interface methods via reflection
> >or jni.
> >
> >With the attached patch applied to kaffe CVS, your
> >test case works fine,  but would you be so kind to
> >check whether it fixes your problems with jython,
> >too?
> >
> 
> It fixes the previous issue-- thanks!

Cool. So we've got jython working with kaffe, then?

> Gzz still doesn't start; I get a 
> "java.lang.VerifyError: No code attribute for 
> gzz/client/GraphicsAPI.startUpdateManager." Obviously, since the code 
> never progressed this far before, I have no idea what's causing this, 
> yet. We'll see.

Well, there had to be something wrong with my
patch ;)

Your patched kaffe/kaffevm/support.c should contain
a function called findMethodFunc.

If you modify this function like this:
======================8<=============================
--- support.c.old	Sat Dec 28 15:08:22 2002
+++ support.c	Sat Dec 28 14:44:05 2002
@@ -366,7 +366,7 @@ findMethodFunc (Method *meth, Hjava_lang
 		
 		return clazz->itable2dtable[implementors[clazz->impl_index] + meth->idx + 1]; 	
 	} else {
-		return METHOD_INDIRECTMETHOD (meth);
+		return meth->idx >= 0 ? obj->dtable->method[meth->idx] : METHOD_INDIRECTMETHOD (meth);
 	}
 }
======================>8=============================
does gzz work then?

Greetings,
Helmer

P.S.: Sorry if this was a little bit confusing,
      I'll send a complete, cleaned-up patch of
      these changes when gzz is working




More information about the kaffe mailing list