[kaffe] CVS kaffe (dalibor): Fixed crash with eclipse 3

Kaffe CVS cvs-commits at kaffe.org
Mon May 24 11:55:06 PDT 2004


PatchSet 4777 
Date: 2004/05/24 17:24:39
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed crash with eclipse 3

2004-05-24  Dalibor Topic  <robilad at kaffe.org>

        * libraries/clib/native/Throwable.c:
        (java_lang_VMThrowable_fillInStackTrace) Added assert for post-condition.

        * kaffe/kaffevm/soft.c:
        (soft_lookupinterfacemethod) Throw NullPointerException if object is null,
        instead of crashing.

Members: 
	ChangeLog:1.2348->1.2349 
	kaffe/kaffevm/soft.c:1.62->1.63 
	libraries/clib/native/Throwable.c:1.9->1.10 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2348 kaffe/ChangeLog:1.2349
--- kaffe/ChangeLog:1.2348	Mon May 24 13:18:51 2004
+++ kaffe/ChangeLog	Mon May 24 17:24:39 2004
@@ -1,3 +1,12 @@
+2004-05-24  Dalibor Topic  <robilad at kaffe.org>
+
+	* libraries/clib/native/Throwable.c:
+	(java_lang_VMThrowable_fillInStackTrace) Added assert for post-condition.	
+
+	* kaffe/kaffevm/soft.c:
+	(soft_lookupinterfacemethod) Throw NullPointerException if object is null,
+	instead of crashing.
+
 2004-05-24  Helmer Kraemer  <hkraemer at freenet.de>
 
 	* kaffe/kaffevm/jit/machine.c (getInsnPC): skip bytes that don't start
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.62 kaffe/kaffe/kaffevm/soft.c:1.63
--- kaffe/kaffe/kaffevm/soft.c:1.62	Wed Apr 21 15:58:00 2004
+++ kaffe/kaffe/kaffevm/soft.c	Mon May 24 17:24:41 2004
@@ -241,6 +241,10 @@
 	register int i;
 	register short* implementors;
 
+	if (obj == NULL) {
+		soft_nullpointer();
+	}
+
 	cls = OBJECT_CLASS(obj);
 	implementors = ifclass->implementors;
 	i = cls->impl_index;
Index: kaffe/libraries/clib/native/Throwable.c
diff -u kaffe/libraries/clib/native/Throwable.c:1.9 kaffe/libraries/clib/native/Throwable.c:1.10
--- kaffe/libraries/clib/native/Throwable.c:1.9	Sun Jul 27 21:42:24 2003
+++ kaffe/libraries/clib/native/Throwable.c	Mon May 24 17:24:41 2004
@@ -29,6 +29,7 @@
 java_lang_VMThrowable_fillInStackTrace(struct Hjava_lang_VMThrowable* o)
 {
 	unhand(o)->backtrace = buildStackTrace(0);
+	assert(unhand(o)->backtrace != NULL);
 }
 
 /*




More information about the kaffe mailing list