This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Could you please check this into 3.0.1, too?
- To: Jeff Sturm <jsturm at one-point dot com>
- Subject: Re: Could you please check this into 3.0.1, too?
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- Date: Tue, 18 Sep 2001 07:33:07 +0200
- Cc: Tom Tromey <tromey at redhat dot com>, java at gcc dot gnu dot org
- References: <20010906095942.A25974@keksy.muc.infineon.com> <Pine.LNX.4.10.10109180036001.9363-100000@mars.deadcafe.org>
- Reply-To: martin dot kahlert at infineon dot com
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.