mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
Merge pull request #403 from dicej/getDeclaredMethods
fix crash when calling Class.getDeclaredMethods using the OpenJDK class ...
This commit is contained in:
commit
a13e97ddf7
@ -2452,10 +2452,19 @@ object makeJconstructor(Thread* t,
|
|||||||
}
|
}
|
||||||
#endif // HAVE_JexecutableHasRealParameterData
|
#endif // HAVE_JexecutableHasRealParameterData
|
||||||
|
|
||||||
|
void resolveBootstrap(Thread* t, Gc::Type type)
|
||||||
|
{
|
||||||
|
if (vm::type(t, type)->vmFlags() & BootstrapFlag) {
|
||||||
|
resolveSystemClass(t, roots(t)->bootLoader(), vm::type(t, type)->name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
object makeJmethod(Thread* t, GcMethod* vmMethod, int index)
|
object makeJmethod(Thread* t, GcMethod* vmMethod, int index)
|
||||||
{
|
{
|
||||||
PROTECT(t, vmMethod);
|
PROTECT(t, vmMethod);
|
||||||
|
|
||||||
|
resolveBootstrap(t, GcJmethod::Type);
|
||||||
|
|
||||||
object name
|
object name
|
||||||
= intern(t,
|
= intern(t,
|
||||||
t->m->classpath->makeString(
|
t->m->classpath->makeString(
|
||||||
@ -2558,6 +2567,8 @@ object makeJconstructor(Thread* t, GcMethod* vmMethod, int index)
|
|||||||
{
|
{
|
||||||
PROTECT(t, vmMethod);
|
PROTECT(t, vmMethod);
|
||||||
|
|
||||||
|
resolveBootstrap(t, GcJconstructor::Type);
|
||||||
|
|
||||||
unsigned parameterCount;
|
unsigned parameterCount;
|
||||||
unsigned returnTypeSpec;
|
unsigned returnTypeSpec;
|
||||||
object parameterTypes = resolveParameterJTypes(t,
|
object parameterTypes = resolveParameterJTypes(t,
|
||||||
@ -2638,6 +2649,8 @@ object makeJfield(Thread* t, GcField* vmField, int index)
|
|||||||
{
|
{
|
||||||
PROTECT(t, vmField);
|
PROTECT(t, vmField);
|
||||||
|
|
||||||
|
resolveBootstrap(t, GcJfield::Type);
|
||||||
|
|
||||||
object name
|
object name
|
||||||
= intern(t,
|
= intern(t,
|
||||||
t->m->classpath->makeString(
|
t->m->classpath->makeString(
|
||||||
|
@ -135,6 +135,9 @@ public class UnsafeTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
System.out.println("method count is "
|
||||||
|
+ Unsafe.class.getDeclaredMethods().length);
|
||||||
|
|
||||||
Unsafe u = avian.Machine.getUnsafe();
|
Unsafe u = avian.Machine.getUnsafe();
|
||||||
|
|
||||||
unsafeCatch(u);
|
unsafeCatch(u);
|
||||||
|
Loading…
Reference in New Issue
Block a user