fix GC safety bugs in getClassAddendum and makeArrayClass

This commit is contained in:
Joel Dice 2011-07-09 18:01:00 -06:00
parent ec4568d806
commit 19d5022456

View File

@ -974,6 +974,8 @@ getClassAddendum(Thread* t, object class_, object pool)
{
object addendum = classAddendum(t, class_);
if (addendum == 0) {
PROTECT(t, class_);
addendum = makeClassAddendum(t, pool, 0, 0, 0, 0, 0);
set(t, class_, ClassAddendum, addendum);
}
@ -1879,6 +1881,8 @@ makeArrayClass(Thread* t, object loader, unsigned dimensions, object spec,
loader,
arrayLength(t, vtable));
PROTECT(t, c);
t->m->processor->initVtable(t, c);
return c;