Could you please check this into 3.0.1, too?

Martin Kahlert martin.kahlert@infineon.com
Mon Sep 17 22:33:00 GMT 2001


Hi Jeff,
thanks for committing the two patches.
On Tue, Sep 18, 2001 at 12:40:37AM -0400, Jeff Sturm wrote:
> I was mildly surprised that nothing had been done in libjava since the
> 3.0.1 release. Are there other simple patches that could go up now? Some
> pre-3.0.2 application testing might be a good idea.

Here are my two favorites:
2001年05月03日 Tom Tromey <tromey@redhat.com>
	* java/lang/natRuntime.cc (init): Call add_library on the program
	itself.
	(_Jv_FindSymbolInExecutable): Return NULL if no library on the
	list has the symbol.
diff -rc gcc-20010910.orig/libjava/java/lang/natRuntime.cc gcc-20010910/libjava/java/lang/natRuntime.cc
*** gcc-20010910.orig/libjava/java/lang/natRuntime.cc	Mon Mar 12 08:33:57 2001
--- gcc-20010910/libjava/java/lang/natRuntime.cc	Tue Sep 11 09:07:28 2001
***************
*** 69,75 ****
 	return r;
 }
 
! return lt_dlsym (NULL, symname);
 }
 
 #endif /* USE_LTDL */
--- 69,75 ----
 	return r;
 }
 
! return NULL;
 }
 
 #endif /* USE_LTDL */
***************
*** 191,196 ****
--- 191,199 ----
 finalize_on_exit = false;
 #ifdef USE_LTDL
 lt_dlinit ();
+ lt_dlhandle self = lt_dlopen (NULL);
+ if (self != NULL)
+ add_library (self);
 #endif
 }
 
and this important one (it causes an infinite loop for my application):
2001年06月15日 Tom Tromey <tromey@redhat.com>
	* jni.cc (_Jv_JNI_NewLocalRef): Search other frames.
Index: jni.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni.cc,v
retrieving revision 1.46
diff -u -r1.46 jni.cc
--- jni.cc 2001年06月15日 22:09:10 1.46
+++ jni.cc 2001年06月15日 23:40:45
@@ -278,16 +278,23 @@
 // Try to find an open slot somewhere in the topmost frame.
 _Jv_JNI_LocalFrame *frame = env->locals;
 bool done = false, set = false;
- while (frame != NULL && ! done)
+ for (; frame != NULL && ! done; frame = frame->next)
 {
 for (int i = 0; i < frame->size; ++i)
- if (frame->vec[i] == NULL)
- {
- set = true;
- done = true;
- frame->vec[i] = obj;
- break;
- }
+ {
+ if (frame->vec[i] == NULL)
+ {
+ set = true;
+ done = true;
+ frame->vec[i] = obj;
+ break;
+ }
+ }
+
+ // If we found a slot, or if the frame we just searched is the
+ // mark frame, then we are done.
+ if (done || frame->marker != MARK_NONE)
+ break;
 }
 if (! set)
I would be glad, if these patches could be applied, too.
Thanks, Martin.
PS: I cc'ed the java list, so other people can make suggestions, too.
-- 
The early bird catches the worm. If you want something else for 
breakfast, get up later.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /