libjava test suite keeps getting stuck

Zack Weinberg zackw@Stanford.EDU
Mon Apr 23 22:31:00 GMT 2001


On Mon, Apr 23, 2001 at 08:05:45PM -0700, Zack Weinberg wrote:
> With this pair of patches, I can build libgcj without linking
> libsupc++.  (Mainline only.)  I still get a ton of libjava testsuite
> failures, but I'm not sure if this tree is consistent.  Real test
> results in slightly more than two hours.

An --enable-threads=posix build also needs this patch.

Test suite is running now.

zw

	* posix-threads.cc (_Jv_ThreadInitData): Use _Jv_Malloc, not new.
	(_Jv_ThreadDestroyData): Use free, not delete.

===================================================================
Index: libjava/posix-threads.cc
--- libjava/posix-threads.cc	2001/03/26 07:05:31	1.23
+++ libjava/posix-threads.cc	2001/04/24 05:30:25
@@ -300,7 +300,7 @@ _Jv_InitThreads (void)
 _Jv_Thread_t *
 _Jv_ThreadInitData (java::lang::Thread *obj)
 {
-  _Jv_Thread_t *data = new _Jv_Thread_t;
+  _Jv_Thread_t *data = (_Jv_Thread_t *) _Jv_Malloc (sizeof (_Jv_Thread_t));
   data->flags = 0;
   data->thread_obj = obj;
 
@@ -315,7 +315,7 @@ _Jv_ThreadDestroyData (_Jv_Thread_t *dat
 {
   pthread_mutex_destroy (&data->wait_mutex);
   pthread_cond_destroy (&data->wait_cond);
-  delete data;
+  free ((void *)data);
 }
 
 void



More information about the Java mailing list