mirror of
https://github.com/corda/corda.git
synced 2025-06-02 07:30:53 +00:00
fix mode=stress thinko and GC safety issue in machine.cpp
This commit is contained in:
parent
3f87129cbc
commit
366dfc009c
@ -602,8 +602,8 @@ postCollect(Thread* t)
|
|||||||
uint64_t
|
uint64_t
|
||||||
invoke(Thread* t, uintptr_t* arguments)
|
invoke(Thread* t, uintptr_t* arguments)
|
||||||
{
|
{
|
||||||
object m = reinterpret_cast<object>(arguments[0]);
|
object m = *reinterpret_cast<object*>(arguments[0]);
|
||||||
object o = reinterpret_cast<object>(arguments[1]);
|
object o = *reinterpret_cast<object*>(arguments[1]);
|
||||||
|
|
||||||
t->m->processor->invoke(t, m, o);
|
t->m->processor->invoke(t, m, o);
|
||||||
|
|
||||||
@ -622,8 +622,11 @@ finalizeObject(Thread* t, object o)
|
|||||||
and vm::strcmp(reinterpret_cast<const int8_t*>("()V"),
|
and vm::strcmp(reinterpret_cast<const int8_t*>("()V"),
|
||||||
&byteArrayBody(t, methodSpec(t, m), 0)) == 0)
|
&byteArrayBody(t, methodSpec(t, m), 0)) == 0)
|
||||||
{
|
{
|
||||||
uintptr_t arguments[] = { reinterpret_cast<uintptr_t>(m),
|
PROTECT(t, m);
|
||||||
reinterpret_cast<uintptr_t>(o) };
|
PROTECT(t, o);
|
||||||
|
|
||||||
|
uintptr_t arguments[] = { reinterpret_cast<uintptr_t>(&m),
|
||||||
|
reinterpret_cast<uintptr_t>(&o) };
|
||||||
|
|
||||||
run(t, invoke, arguments);
|
run(t, invoke, arguments);
|
||||||
|
|
||||||
@ -2155,7 +2158,7 @@ void
|
|||||||
doCollect(Thread* t, Heap::CollectionType type)
|
doCollect(Thread* t, Heap::CollectionType type)
|
||||||
{
|
{
|
||||||
#ifdef VM_STRESS
|
#ifdef VM_STRESS
|
||||||
bool stress = (t->flags |= Thread::StressFlag);
|
bool stress = (t->flags & Thread::StressFlag) != 0;
|
||||||
if (not stress) atomicOr(&(t->flags), Thread::StressFlag);
|
if (not stress) atomicOr(&(t->flags), Thread::StressFlag);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user