Bug in Method.invoke() / Patch
Godmar Back
kaffe@rufus.w3.org
Wed, 25 Jul 2001 11:21:34 -0600 (MDT)
Hi Enno,
thanks for your report.
>
> Attached is a patch, which to my opinion should fix this (using
> getInheritedMethodIndex() in classMethod.c), but I would appreciate
> if somebody more familiar with this code could check my explanation/fix.
>
I agree with your explanation, but I have doubts about the fix.
classMethod.c:getInheritedMethodIndex() should probably be static
anyway, and we mustn't tweak m->idx after a class was loaded.
I think we're screwing ourselves when we set meth->slot
in Class.c:makeMethod in the case where CLASS_IS_INTERFACE(meth->class).
I haven't thought through what the best fix might be (probably handle
the case where CLASS_IS_INTERFACE(meth->class) separately in
Method.c:invoke0(), but I don't have the time right now to do that.
- Godmar