diff --git a/src/machine.cpp b/src/machine.cpp index 44a131db2d..e47d5ffbc5 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -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;