This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Minor bug, JVMPI observation
- To: "'java-patches at gcc dot gnu dot org'" <java-patches at gcc dot gnu dot org>
- Subject: Minor bug, JVMPI observation
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Tue, 13 Nov 2001 15:51:44 -0800
I just discovered the following bug, which I previously introduced into
natString.cc. This is completely broken if JVMPI is disabled. This
strongly suggests that everyone is building with JVMPI enabled (i.e. without
--disable-jvmpi), whether they know it or not. Is this intentional? (I
don't think it makes a large difference, yet. I expect that to change
if/when we get direct calls GC_gcj_malloc.)
OK to commit to the trunk?
Hans
java/lang/natString.cc: Correct argument order for
_Jv_AllocPtrFreeObj.
Index: java/lang/natString.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natString.cc,v
retrieving revision 1.24
diff -u -r1.24 natString.cc
--- natString.cc 2001/07/30 20:24:17 1.24
+++ natString.cc 2001/11/13 21:36:15
@@ -400,7 +400,7 @@
#else
// Class needs no initialization, and there is no finalizer, so
// we can go directly to the collector's allocator interface.
- jstring obj = (jstring) _Jv_AllocPtrFreeObj(&StringClass, sz);
+ jstring obj = (jstring) _Jv_AllocPtrFreeObj(sz, &StringClass);
#endif
obj->data = obj;
obj->boffset = sizeof(java::lang::String);