This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.4 PATCH: Fix Tru64 UNIX libjava bootstrap failure in java/lang/

Current mainline failed to bootstrap on alpha-dec-osf4.0f and

/vol/gnu/src/gcc/gcc-dist/libjava/java/lang/ In function `bool _Jv_ObjectCheckMonitor(java::lang::Object*)':
/vol/gnu/src/gcc/gcc-dist/libjava/java/lang/ error: ISO C++ forbids comparison between pointer and integer

This is the following test

      not_mine = hl ? (hl->si.mutex.owner != self) : true;

where hl->si.mutex.owner is pthread_t (a pointer to some structure on
Tru64 UNIX), self is _Jv_ThreadId_t (typedef'ed to unsigned long).

The following patch fixes this and allowed the bootstrap to finish.  There
are several libjava testsuite regressions compared to my last successful
bootstrap on 20030925, but they are almost certainly unrelated:

FAIL: ArrayClass -O3 compilation from bytecode In class `ArrayClass': In method `class$(java.lang.String)': internal compiler error: in cgraph_function_possibly_inlined_p, at cgraph.c:541

They happen on several other platforms (e.g. i386-pc-solaris2.10,
mips-sgi-irix6.5) as well, even when POSIX Threads are not in use, but only
at -O3.

Ok for mainline?


Rainer Orth, Faculty of Technology, Bielefeld University

Thu Oct 23 02:27:28 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* java/lang/ (_Jv_ObjectCheckMonitor): Use
	_Jv_MutexCheckMonitor instead of accessing mutex.owner directly.

Index: libjava/java/lang/
RCS file: /cvs/gcc/gcc/libjava/java/lang/,v
retrieving revision 1.28
diff -u -p -r1.28
--- libjava/java/lang/	21 Oct 2003 04:46:19 -0000	1.28
+++ libjava/java/lang/	23 Oct 2003 20:04:19 -0000
@@ -1127,7 +1127,7 @@ retry:
       heavy_lock* hl = find_heavy(addr, he);
-      not_mine = hl ? (hl->si.mutex.owner != self) : true;
+      not_mine = hl ? _Jv_MutexCheckMonitor(&hl->si.mutex) : true;
   release_set(&(he -> address), address);	// unlock hash entry

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]