mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
fix GC safety bugs in getClassAddendum and makeArrayClass
This commit is contained in:
parent
ec4568d806
commit
19d5022456
@ -974,6 +974,8 @@ getClassAddendum(Thread* t, object class_, object pool)
|
|||||||
{
|
{
|
||||||
object addendum = classAddendum(t, class_);
|
object addendum = classAddendum(t, class_);
|
||||||
if (addendum == 0) {
|
if (addendum == 0) {
|
||||||
|
PROTECT(t, class_);
|
||||||
|
|
||||||
addendum = makeClassAddendum(t, pool, 0, 0, 0, 0, 0);
|
addendum = makeClassAddendum(t, pool, 0, 0, 0, 0, 0);
|
||||||
set(t, class_, ClassAddendum, addendum);
|
set(t, class_, ClassAddendum, addendum);
|
||||||
}
|
}
|
||||||
@ -1879,6 +1881,8 @@ makeArrayClass(Thread* t, object loader, unsigned dimensions, object spec,
|
|||||||
loader,
|
loader,
|
||||||
arrayLength(t, vtable));
|
arrayLength(t, vtable));
|
||||||
|
|
||||||
|
PROTECT(t, c);
|
||||||
|
|
||||||
t->m->processor->initVtable(t, c);
|
t->m->processor->initVtable(t, c);
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
|
Loading…
Reference in New Issue
Block a user