This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
assertion with --enable-libgcj-debug
- From: Anthony Green <green at redhat dot com>
- To: java at gcc dot gnu dot org
- Date: Sun, 03 Jul 2005 00:06:40 -0700
- Subject: assertion with --enable-libgcj-debug
Hi,
I wanted to poke at Azureus again, so I built a 4.0 branch toolchain with
--enable-libgcj-debug. I had to apply the following hack in order for libgcj
to compile cleanly, since we have some assertions that try to read non-public
fields.
Index: gcj/javaprims.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gcj/javaprims.h,v
retrieving revision 1.55
diff -u -p -r1.55 javaprims.h
--- gcj/javaprims.h 23 Feb 2005 17:36:24 -0000 1.55
+++ gcj/javaprims.h 3 Jul 2005 07:00:50 -0000
@@ -535,6 +535,9 @@ typedef unsigned int _Jv_ulong __attribu
class _Jv_Utf8Const
{
+#ifdef DEBUG
+ public:
+#endif
_Jv_ushort hash;
_Jv_ushort length; /* In bytes, of data portion, without final '\0'. */
char data[1]; /* In Utf8 format, with final '\0'. */
Once I had build everything, I found that every time I tried to run
interpreted code I got:
libgcj failure: klass->state == JV_STATE_LOADED
in function defineClass, file ../../../gcc/libjava/java/lang/natVMClassLoader.cc, line 106
Aborted
Is the assertion wrong, or our code?
klass->state is JV_STATE_READ when we assert.
Thanks,
AG