This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in _Jv_JNI_DeleteLocalRef (+patch)


Hi!

This is an obvious fix of jni.cc (_Jv_JNI_DeleteLocalRef).
In my case, frame->size == 16 < FRAME_SIZE --> SegFault.

The patch was made against today's CVS version.

Bye,
Martin.


2001-10-04  Martin Kahlert  <martin.kahlert@infineon.com>

	* jni.cc (_Jv_JNI_DeleteLocalRef): Use correct frame size

--- jni.cc.old	Thu Oct  4 11:29:45 2001
+++ jni.cc	Thu Oct  4 11:33:22 2001
@@ -214,7 +214,7 @@
 
   for (frame = env->locals; frame != NULL; frame = frame->next)
     {
-      for (int i = 0; i < FRAME_SIZE; ++i)
+      for (int i = 0; i < frame->size; ++i)
 	{
 	  if (frame->vec[i] == obj)
 	    {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]