[kaffe] CVS kaffe (guilhem): Importatnt fix for strings (lock object)
Kaffe CVS
cvs-commits at kaffe.org
Mon Mar 28 08:14:54 PST 2005
PatchSet 5618
Date: 2005/03/28 16:08:36
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Importatnt fix for strings (lock object)
* kaffe/kaffevm/string.c
(stringWalk): Mark the object lock also.
Reported by: gian paolo ciceri <gp.ciceri at acm.org>
Members:
ChangeLog:1.3790->1.3791
kaffe/kaffevm/string.c:1.40->1.41
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3790 kaffe/ChangeLog:1.3791
--- kaffe/ChangeLog:1.3790 Sun Mar 27 16:05:39 2005
+++ kaffe/ChangeLog Mon Mar 28 16:08:36 2005
@@ -1,3 +1,10 @@
+2005-03-28 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * kaffe/kaffevm/string.c
+ (stringWalk): Mark the object lock also.
+
+ Reported by: gian paolo ciceri <gp.ciceri at acm.org>
+
2005-03-27 Guilhem Lavaux <guilhem at kaffe.org>
* kaffe/kaffevm/kaffe.def
Index: kaffe/kaffe/kaffevm/string.c
diff -u kaffe/kaffe/kaffevm/string.c:1.40 kaffe/kaffe/kaffevm/string.c:1.41
--- kaffe/kaffe/kaffevm/string.c:1.40 Fri Mar 11 16:41:53 2005
+++ kaffe/kaffe/kaffevm/string.c Mon Mar 28 16:08:37 2005
@@ -490,8 +490,15 @@
void
stringWalk(Collector* collector, void *gc_info, void* str, uint32 size UNUSED)
{
+ Hjava_lang_String *objstr = (Hjava_lang_Object *)str;
+ iLock *lk;
+
/* That's all we have to do here */
- KGC_markObject(collector, gc_info, unhand((Hjava_lang_String*)str)->value);
+ KGC_markObject(collector, gc_info, unhand(objstr)->value);
+
+ lk = GET_HEAVYLOCK(unhand(objstr)->base.lock);
+ if (lk != NULL && KGC_getObjectIndex(collector, lk) == KGC_ALLOC_LOCK)
+ KGC_markObject(collector, gc_info, lk);
}
/*
More information about the kaffe
mailing list