throw IllegalArgumentException in JVM_InvokeMethod on type mismatch

This commit is contained in:
Joel Dice 2013-04-09 17:43:25 -06:00
parent 49d8ccb1bd
commit 73547db737

View File

@ -4674,6 +4674,10 @@ jvmInvokeMethod(Thread* t, uintptr_t* arguments)
(t, jclassVmClass(t, jmethodClazz(t, *method))),
jmethodSlot(t, *method));
if (instance and not instanceOf(t, methodClass(t, vmMethod), *instance)) {
throwNew(t, Machine::IllegalArgumentExceptionType);
}
return reinterpret_cast<uint64_t>
(makeLocalReference
(t, invoke