mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
add new array classes to classloader map upon creation
We were already doing this for non-array classes; we need to do it for all classes or else risk creating duplicates.
This commit is contained in:
parent
cca9a5ee0b
commit
4b1b3e032b
@ -3255,14 +3255,13 @@ resolveClass(Thread* t, object loader, object spec, bool throw_)
|
|||||||
PROTECT(t, loader);
|
PROTECT(t, loader);
|
||||||
PROTECT(t, spec);
|
PROTECT(t, spec);
|
||||||
|
|
||||||
{ object c = findLoadedClass(t, loader, spec);
|
object c = findLoadedClass(t, loader, spec);
|
||||||
if (c) {
|
if (c) {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (byteArrayBody(t, spec, 0) == '[') {
|
if (byteArrayBody(t, spec, 0) == '[') {
|
||||||
return resolveArrayClass(t, loader, spec, throw_);
|
c = resolveArrayClass(t, loader, spec, throw_);
|
||||||
} else {
|
} else {
|
||||||
if (root(t, Machine::LoadClassMethod) == 0) {
|
if (root(t, Machine::LoadClassMethod) == 0) {
|
||||||
object m = resolveMethod
|
object m = resolveMethod
|
||||||
@ -3295,7 +3294,13 @@ resolveClass(Thread* t, object loader, object spec, bool throw_)
|
|||||||
|
|
||||||
object specString = makeString(t, "%s", RUNTIME_ARRAY_BODY(s));
|
object specString = makeString(t, "%s", RUNTIME_ARRAY_BODY(s));
|
||||||
|
|
||||||
object c = t->m->processor->invoke(t, method, loader, specString);
|
object jc = t->m->processor->invoke(t, method, loader, specString);
|
||||||
|
if (LIKELY(jc and t->exception == 0)) {
|
||||||
|
c = jclassVmClass(t, jc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (LIKELY(c and t->exception == 0)) {
|
if (LIKELY(c and t->exception == 0)) {
|
||||||
PROTECT(t, c);
|
PROTECT(t, c);
|
||||||
@ -3307,16 +3312,11 @@ resolveClass(Thread* t, object loader, object spec, bool throw_)
|
|||||||
set(t, loader, ClassLoaderMap, map);
|
set(t, loader, ClassLoaderMap, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = jclassVmClass(t, c);
|
|
||||||
|
|
||||||
hashMapInsert
|
hashMapInsert
|
||||||
(t, classLoaderMap(t, loader), spec, c, byteArrayHash);
|
(t, classLoaderMap(t, loader), spec, c, byteArrayHash);
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (t->exception == 0) {
|
if (t->exception == 0) {
|
||||||
object message = makeString(t, "%s", &byteArrayBody(t, spec, 0));
|
object message = makeString(t, "%s", &byteArrayBody(t, spec, 0));
|
||||||
t->exception = t->m->classpath->makeThrowable
|
t->exception = t->m->classpath->makeThrowable
|
||||||
@ -3883,6 +3883,8 @@ printTrace(Thread* t, object exception)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
object
|
object
|
||||||
@ -4087,6 +4089,8 @@ vmPrintTrace(Thread* t)
|
|||||||
fprintf(stderr, "debug trace for thread %p\n", t);
|
fprintf(stderr, "debug trace for thread %p\n", t);
|
||||||
|
|
||||||
t->m->processor->walkStack(t, &v);
|
t->m->processor->walkStack(t, &v);
|
||||||
|
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// also for debugging
|
// also for debugging
|
||||||
|
Loading…
Reference in New Issue
Block a user