[kaffe] CVS kaffe (guilhem): Fixlets for JVMPI

Kaffe CVS cvs-commits at kaffe.org
Thu Jul 21 06:09:24 PDT 2005


PatchSet 6754 
Date: 2005/07/21 13:03:25
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixlets for JVMPI

	* kaffe/jvmpi/jvmpi_kaffe.c
	(jvmpiRequestEvent): Return failure if the argument is wrong.

	* libraries/clib/native/Object.c
	(java_lang_VMObject_wait): Send JVMPI_EVENT_MONITOR_WAITED and not
	JVMPI_EVENT_MONITOR_WAIT when the waiting finishes.

Members: 
	ChangeLog:1.4279->1.4280 
	kaffe/jvmpi/jvmpi_kaffe.c:1.14->1.15 
	libraries/clib/native/Object.c:1.16->1.17 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4279 kaffe/ChangeLog:1.4280
--- kaffe/ChangeLog:1.4279	Wed Jul 20 21:36:11 2005
+++ kaffe/ChangeLog	Thu Jul 21 13:03:25 2005
@@ -1,3 +1,12 @@
+2005-07-21  Guilhem Lavaux  <guilhem at kaffe.org>
+
+	* kaffe/jvmpi/jvmpi_kaffe.c
+	(jvmpiRequestEvent): Return failure if the argument is wrong.
+
+	* libraries/clib/native/Object.c
+	(java_lang_VMObject_wait): Send JVMPI_EVENT_MONITOR_WAITED and not
+	JVMPI_EVENT_MONITOR_WAIT when the waiting finishes.
+	
 2005-07-20  Dalibor Topic  <robilad at kaffe.org>
 
 	Fix for gump issue bootstrap-ant.
Index: kaffe/kaffe/jvmpi/jvmpi_kaffe.c
diff -u kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.14 kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.15
--- kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.14	Tue Jul 19 20:30:09 2005
+++ kaffe/kaffe/jvmpi/jvmpi_kaffe.c	Thu Jul 21 13:03:28 2005
@@ -622,6 +622,8 @@
 
 			retval = JVMPI_SUCCESS;
 			cl = (struct Hjava_lang_Class *)arg;
+			if (cl == NULL)
+				return JVMPI_FAIL;
 			jvmpi_methods = alloca(sizeof(JVMPI_Method) *
 					       CLASS_NMETHODS(cl));
 			jvmpi_fields = alloca(sizeof(JVMPI_Field) *
@@ -643,6 +645,8 @@
 
 			retval = JVMPI_SUCCESS;
 			tid = (struct Hjava_lang_Thread *)arg;
+			if (tid == NULL)
+				return JVMPI_FAIL;
 			jvmpiFillThreadStart(&ev, tid);
 			ev.event_type |= JVMPI_REQUESTED_EVENT;
 			jvmpiPostEvent(&ev);
@@ -656,11 +660,13 @@
 			struct Hjava_lang_Object *obj;
 			JVMPI_Event ev;
 
-			retval = JVMPI_SUCCESS;
 			obj = (struct Hjava_lang_Object *)arg;
+			if (obj == NULL)
+				return JVMPI_FAIL;
 			jvmpiFillObjectAlloc(&ev, obj);
 			ev.event_type |= JVMPI_REQUESTED_EVENT;
 			jvmpiPostEvent(&ev);
+			retval = JVMPI_SUCCESS;
 		}
 		break;
 	}
Index: kaffe/libraries/clib/native/Object.c
diff -u kaffe/libraries/clib/native/Object.c:1.16 kaffe/libraries/clib/native/Object.c:1.17
--- kaffe/libraries/clib/native/Object.c:1.16	Tue May 31 17:55:51 2005
+++ kaffe/libraries/clib/native/Object.c	Thu Jul 21 13:03:28 2005
@@ -126,11 +126,11 @@
 #endif
   waitCond(o, timeout);
 #if defined(ENABLE_JVMPI)
-  if( JVMPI_EVENT_ISENABLED(JVMPI_EVENT_MONITOR_WAIT) )
+  if( JVMPI_EVENT_ISENABLED(JVMPI_EVENT_MONITOR_WAITED) )
     {
       JVMPI_Event ev;
       
-      ev.event_type = JVMPI_EVENT_MONITOR_WAIT;
+      ev.event_type = JVMPI_EVENT_MONITOR_WAITED;
       if( o == getCurrentThread()->vmThread )
 	{
 	  ev.u.monitor_wait.object = NULL;




More information about the kaffe mailing list