[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnu_java_awt_peer_gtk_GdkFontPeer.c (initStaticState): missing NewGlobal
From: |
Christian Thalinger |
Subject: |
gnu_java_awt_peer_gtk_GdkFontPeer.c (initStaticState): missing NewGlobalRef? |
Date: |
Tue, 8 Nov 2005 16:42:15 +0100 |
User-agent: |
Mutt/1.5.9i |
Hi!
We are currently developing a JNI source code analyzer, which scans for
missing NewGlobalRef calls (this is for popl06). And it seems that it
has found a bug in GNU classpath's gtk peers.
In Java_gnu_java_awt_peer_gtk_GdkFontPeer_initStaticState the global
variable glyphVector_class is not registered and is used afterwards in
getGlyphVector to instantiate a new object.
I think this should be something like:
Index: gnu_java_awt_peer_gtk_GdkFontPeer.c
===================================================================
RCS file:
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c,v
retrieving revision 1.10
diff -u -3 -p -r1.10 gnu_java_awt_peer_gtk_GdkFontPeer.c
--- gnu_java_awt_peer_gtk_GdkFontPeer.c 19 Sep 2005 05:47:09 -0000
1.10
+++ gnu_java_awt_peer_gtk_GdkFontPeer.c 8 Nov 2005 15:37:39 -0000
@@ -65,6 +65,9 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_i
glyphVector_class = (*env)->FindClass
(env, "gnu/java/awt/peer/gtk/GdkGlyphVector");
+ glyphVector_class = (*env)->NewGlobalRef
+ (env, glyphVector_class);
+
glyphVector_ctor = (*env)->GetMethodID
(env, glyphVector_class, "<init>",
"([D[ILjava/awt/Font;Ljava/awt/font/FontRenderContext;)V");
Comments?
TWISTI
- gnu_java_awt_peer_gtk_GdkFontPeer.c (initStaticState): missing NewGlobalRef?,
Christian Thalinger <=