From d0f8889e271dbe637a10daf786f442cc1825cfe3 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 18 Sep 2009 12:20:35 -0600 Subject: [PATCH] fix GC safety bugs in parseMethodTable and makeArrayClass --- src/machine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/machine.cpp b/src/machine.cpp index a39931d413..570550f3bd 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -1540,6 +1540,7 @@ parseMethodTable(Thread* t, Stream& s, object class_, object pool) } if (abstractVirtuals) { + PROTECT(t, vtable); PROTECT(t, abstractVirtuals); unsigned oldLength = arrayLength(t, classMethodTable(t, class_)); @@ -1713,6 +1714,7 @@ makeArrayClass(Thread* t, object loader, unsigned dimensions, object spec, object makeArrayClass(Thread* t, object loader, object spec) { + PROTECT(t, loader); PROTECT(t, spec); const char* s = reinterpret_cast(&byteArrayBody(t, spec, 0));