mirror of
https://github.com/corda/corda.git
synced 2025-01-23 04:48:09 +00:00
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
This commit is contained in:
commit
9183cfe8e3
@ -6328,7 +6328,7 @@ class SegFaultHandler: public System::SignalHandler {
|
||||
void** thread)
|
||||
{
|
||||
MyThread* t = static_cast<MyThread*>(m->localThread->get());
|
||||
if (t->state == Thread::ActiveState) {
|
||||
if (t and t->state == Thread::ActiveState) {
|
||||
object node = methodForIp(t, *ip);
|
||||
if (node) {
|
||||
void* oldIp = t->ip;
|
||||
|
@ -77,8 +77,17 @@ DetachCurrentThread(Machine* m)
|
||||
{
|
||||
Thread* t = static_cast<Thread*>(m->localThread->get());
|
||||
if (t) {
|
||||
expect(t, t != m->rootThread);
|
||||
|
||||
m->localThread->set(0);
|
||||
t->exit();
|
||||
|
||||
ACQUIRE_RAW(t, t->m->stateLock);
|
||||
|
||||
enter(t, Thread::ActiveState);
|
||||
enter(t, Thread::ZombieState);
|
||||
|
||||
t->state = Thread::JoinedState;
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
@ -1236,7 +1245,7 @@ SetObjectArrayElement(Thread* t, jobjectArray array, jsize index,
|
||||
{
|
||||
ENTER(t, Thread::ActiveState);
|
||||
|
||||
set(t, *array, ArrayBody + (index * BytesPerWord), *value);
|
||||
set(t, *array, ArrayBody + (index * BytesPerWord), (value ? *value : 0));
|
||||
}
|
||||
|
||||
jbooleanArray JNICALL
|
||||
|
@ -2943,48 +2943,13 @@ linkClass(Thread* t, object loader, object class_)
|
||||
}
|
||||
|
||||
if (classMethodTable(t, class_)) {
|
||||
bool resolvedPool = false;
|
||||
for (unsigned i = 0;
|
||||
i < arrayLength(t, classMethodTable(t, class_)); ++i)
|
||||
{
|
||||
object method = arrayBody(t, classMethodTable(t, class_), i);
|
||||
PROTECT(t, method);
|
||||
|
||||
object code = methodCode(t, method);
|
||||
if ((not resolvedPool)
|
||||
and code
|
||||
and codePool(t, code)
|
||||
and objectClass(t, codePool(t, code))
|
||||
== arrayBody(t, t->m->types, Machine::SingletonType))
|
||||
{
|
||||
object pool = codePool(t, code);
|
||||
PROTECT(t, pool);
|
||||
unsigned count = singletonCount(t, pool);
|
||||
for (unsigned j = 0; j < count; ++j) {
|
||||
if (singletonIsObject(t, pool, j)) {
|
||||
object entry = singletonObject(t, pool, j);
|
||||
if (objectClass(t, entry)
|
||||
== arrayBody(t, t->m->types, Machine::ReferenceType))
|
||||
{
|
||||
if (referenceSpec(t, entry) == 0) {
|
||||
resolveClassInPool(t, loader, method, j);
|
||||
} else if (byteArrayBody(t, referenceSpec(t, entry), 0) == '(')
|
||||
{
|
||||
resolveMethod(t, loader, method, j);
|
||||
} else {
|
||||
resolveField(t, loader, method, j);
|
||||
}
|
||||
|
||||
if (UNLIKELY(t->exception)) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resolvedPool = true;
|
||||
}
|
||||
|
||||
object spec = methodSpec(t, method);
|
||||
object spec = methodSpec
|
||||
(t, arrayBody(t, classMethodTable(t, class_), i));
|
||||
PROTECT(t, spec);
|
||||
|
||||
for (unsigned j = 1; j < byteArrayLength(t, spec);) {
|
||||
j = resolveSpec(t, loader, spec, j);
|
||||
if (UNLIKELY(t->exception)) return;
|
||||
|
@ -129,7 +129,7 @@ class MySystem: public System {
|
||||
|
||||
virtual void join() {
|
||||
int rv UNUSED = pthread_join(thread, 0);
|
||||
//expect(s, rv == 0);
|
||||
expect(s, rv == 0);
|
||||
}
|
||||
|
||||
virtual void dispose() {
|
||||
|
Loading…
Reference in New Issue
Block a user