>
> Actually, I found that the Sun's JDK also uses recursion here.
> However, as JDK consumes less stack space than Kaffe (especially
> Kaffe-interpreter), the problem is visible only in Kaffe.
>
> So there are two problems:
> 1) Low default stack space used by Kaffe compared to its needs.
> 2) Bug in jCVS-4.7.5 (which is obsoleted by newer versions)
>
This is all be true, but
> There is no bug in AWTEventMulticaster
>
I strongly disagree with this conclusion.
Consider this program:
import java.awt.*;
public class CrashKaffe {
public static void main(String av[]) {
Frame f = new Frame();
Canvas c = new Canvas();
f.add(c);
f.pack();
f.show();
for (int i = 0;;i++) {
Graphics g = c.getGraphics();
c.resize(i%100, i%100);
}
}
}
Should it be able crash kaffe? I don't think so.
In this particular case, the problem is caused by a combination
of factors, including
+ the implementation of AWTEventMulticaster
+ the implementation of Canvas.getGraphics()
+ my not disposing of g in the loop.
However, none of these factors should terminate the program.
A performance degradation may be acceptable (which is what happens
according to Sun's JDK book if you don't dispose a Graphics object),
but if you really think about it not even that is really acceptable.
Program termination is definitely unacceptable. That's why I call
it a bug.
- Godmar