classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GJava_gnu_java_awt_peer_gtk_GdkGraphics_setFGColor possible crash


From: Christian Thalinger
Subject: Re: GJava_gnu_java_awt_peer_gtk_GdkGraphics_setFGColor possible crash
Date: Thu, 28 Jul 2005 10:06:37 +0200

On Wed, 2005-07-27 at 11:49 -0600, Tom Tromey wrote: 
> >>>>> "Twisti" == Christian Thalinger <address@hidden> 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  <address@hidden>
> 
>       * 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]