Bug in Method.invoke() / Patch
gback at cs.utah.edu
Wed Jul 25 10:21:34 PDT 2001
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.
More information about the kaffe