On Wed, 2005-07-27 at 11:49 -0600, Tom Tromey wrote: > >>>>> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes: > > Twisti> We have some problems with the spec jvm applet and i think i've found > a > Twisti> problem. Java_gnu_java_awt_peer_gtk_GdkGraphics_setFGColor uses > Twisti> NSA_GET_PTR to get the graphics pointer, which calls cp_gtk_get_state. > Twisti> This function may return NULL in exception case, which lets this code > Twisti> crash: > > Was this fixed by this patch yesterday? > > 2005-07-26 Thomas Fitzsimmons <[EMAIL PROTECTED]> > > * gnu/java/awt/peer/gtk/GdkGraphics.java, > native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c: Add > static initializer. > (initStaticState): New method. > Add new global graphics reference state table and macros. > * include/gnu_java_awt_peer_gtk_GdkGraphics.h: Regenerate. > * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: Use new > NSA_GET_G_PTR macro to retreive graphics objects. > * native/jni/gtk-peer/gtkpeer.h: Add new graphics state table and > macros.
I don't think so. It's actually not a classpath bug i hit (it's definitely a cacao bug), it's more theoretical. As the function _can_ return NULL and is dereferenced without checking. And this can lead to crashes somewhere in jni code. I don't know what your guidelines are in such a case. TWISTI _______________________________________________ Classpath mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath

