libjava test suite keeps getting stuck

Zack Weinberg zackw@Stanford.EDU
Fri Apr 27 17:04:00 GMT 2001


On Fri, Apr 27, 2001 at 11:11:18AM -0600, Tom Tromey wrote:
> >>>>> "Zack" == Zack Weinberg <zackw@Stanford.EDU> writes:
>> Zack> jvm.h was the first header I found which was included by all the
> Zack> C++ files that needed to get hit by the pragma, and marked
> Zack> "implementation internals"; there may be a better place.
>> If we want all native code, both ours and random CNI users, to be
> affected by this pragma then cni.h is probably the best choice.
> Or maybe java/lang/Object.h.

Shall I put it in jvm.h and you can move it later if you decide you
want the global impact?
...
> Zack> 	* Makefile.am (libgcj.la): Remove libsupc++convenience.la from
> Zack> 	link line.
> Zack> 	* Makefile.in: Regenerate (by hand).
> Zack> 	* include/jvm.h: Insert #pragma GCC java_exceptions here.
> Zack> 	* prims.cc (_Jv_ThisExecutable): Use _Jv_Malloc.
> Zack> 	* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader):
> Zack> 	Likewise.
>> These patches look fine to me.

I've applied the appended subset, containing just the prims.cc and
posix-threads.cc changes, which are independent of the C++ front end
changes. I'll work up a doc patch and resubmit the rest of it with
that included, then apply it once C++ signs off.
zw
	* prims.cc (_Jv_ThisExecutable): Use _Jv_Malloc.
	* posix-threads.cc (_Jv_ThreadInitData): Use _Jv_Malloc.
	(_Jv_ThreadDestroyData): Use _Jv_Free.
===================================================================
Index: prims.cc
--- prims.cc	2001年03月26日 07:05:31	1.49
+++ prims.cc	2001年04月28日 00:03:24
@@ -609,7 +609,7 @@ _Jv_ThisExecutable (const char *name)
 {
 if (name)
 {
- _Jv_execName = new char[strlen (name) + 1];
+ _Jv_execName = (char *) _Jv_Malloc (strlen (name) + 1);
 strcpy (_Jv_execName, name);
 }
 }
===================================================================
Index: posix-threads.cc
--- posix-threads.cc	2001年03月26日 07:05:31	1.23
+++ posix-threads.cc	2001年04月28日 00:03:24
@@ -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;
+ _Jv_Free ((void *)data);
 }
 
 void


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /