[Kaffe] found cause of bug method invocation, patch included!

Moses DeJong dejong at cs.umn.edu
Wed Feb 24 00:03:28 PST 1999


On 24 Feb 1999, Alexandre Oliva wrote:

> On Feb 24, 1999, Moses DeJong <dejong at cs.umn.edu> wrote:
> 
> > On Sun, 7 Feb 1999, Godmar Back wrote:
> >> > 
> >> > I am not sure what the "right" way to fix this is. Does someone that
> >> > knows a little more about the Kaffe internals comment about the best
> >> > way to fix this for little and big endian machines?
> >> 
> >> Alexandre had also suspected that it's a endianness problem.  He promised
> >> to look into it.
> 
> > Big news!
> 
> > I have been able to fix the endian problems with JNI and
> > reflection in Kaffe.
> 
> Excellent, that's exactly what I suspected to be the problem, but I
> hadn't found time to investigate yet :-(

Oops, was that the wrong thing to do? I got a compiler error so
I just "made it work". How about this for a ChangeLog entry.


Wed Feb 24 01:56:30 CST 1999  Moses DeJong <dejong at cs.umn.edu>

        * kaffe/kaffevm/jni.c : fixed endian problem with JNI and
        reflection. Also used jboolean instead of jbool.
        * kaffe/kaffeh/sigs.c : use jboolean instead of jbool in kaffeh
        * libraries/clib/native/Runtime.c : changed jbool to jboolean.


Index: Runtime.c
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/clib/native/Runtime.c,v
retrieving revision 1.11
diff -u -r1.11 Runtime.c
--- Runtime.c	1999/02/24 06:01:13	1.11
+++ Runtime.c	1999/02/24 09:08:06
@@ -33,7 +33,7 @@
 extern char* libraryPath;
 extern size_t gc_heap_limit;
 extern size_t gc_heap_total;
-extern jbool runFinalizerOnExit;
+extern jboolean runFinalizerOnExit;
 

 /*
@@ -73,7 +73,7 @@
 /*
  * Load in a library file.
  */
-jbool
+jboolean
 java_lang_Runtime_loadFileInternal(struct Hjava_lang_Runtime* this, struct Hjava_lang_String* s1)
 {
 	char lib[MAXPATHLEN];
@@ -153,7 +153,7 @@
  * Enable/disable tracing of instructions.
  */
 void
-java_lang_Runtime_traceInstructions(struct Hjava_lang_Runtime* this, jbool on)
+java_lang_Runtime_traceInstructions(struct Hjava_lang_Runtime* this, jboolean on)
 {
 	if (on == true) {
 		SignalError("java.lang.RuntimeException", "Cannot trace instructions");   
@@ -164,7 +164,7 @@
  * Enable/disable tracing of method calls.
  */
 void
-java_lang_Runtime_traceMethodCalls(struct Hjava_lang_Runtime* this, jbool on)
+java_lang_Runtime_traceMethodCalls(struct Hjava_lang_Runtime* this, jboolean on)
 {
 	if (on == true) {
 		SignalError("java.lang.RuntimeException", "Cannot trace method calls");   
@@ -175,7 +175,7 @@
  * Inform the runtime that it must run the finalizer when it exits.
  */
 void
-java_lang_Runtime_runFinalizersOnExit(jbool on)
+java_lang_Runtime_runFinalizersOnExit(jboolean on)
 {
 	runFinalizerOnExit = on;
 }


Mo DeJong
dejong at cs.umn.edu



> I'll install the patch as soon as you provide a ChangeLog entry (since 
> you're on-line :-), and revert this part:
> 
> > -java_lang_Runtime_runFinalizersOnExit(jbool on)
> > +java_lang_Runtime_runFinalizersOnExit(struct Hjava_lang_Runtime* rt, jboolean on)
> 
> Because runFinalizersOnExit is really supposed to be static, as in the
> current Klasses.jar.
> 
> Thanks for tracking this down!
> 
> -- 
> Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org,computer.org}
> oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
> Instituto de Computação, Universidade Estadual de Campinas, SP, Brasil
>





More information about the kaffe mailing list