8315698: Crash when comparing BasicType as int after JDK-8310577

Reviewed-by: dlong, kvn, coleenp
This commit is contained in:
Daniel Jeliński 2023-09-07 04:52:18 +00:00
parent b05198a4f3
commit ab28300a42
2 changed files with 11 additions and 1 deletions

View File

@ -326,6 +326,16 @@ address StubGenerator::generate_call_stub(address& return_address) {
__ jcc(Assembler::equal, is_float);
__ cmpl(c_rarg1, T_DOUBLE);
__ jcc(Assembler::equal, is_double);
#ifdef ASSERT
// make sure the type is INT
{
Label L;
__ cmpl(c_rarg1, T_INT);
__ jcc(Assembler::equal, L);
__ stop("StubRoutines::call_stub: unexpected result type");
__ bind(L);
}
#endif
// handle T_INT case
__ movl(Address(c_rarg0, 0), rax);

View File

@ -301,7 +301,7 @@ class StubRoutines: AllStatic {
typedef void (*CallStub)(
address link,
intptr_t* result,
BasicType result_type,
int result_type, /* BasicType on 4 bytes */
Method* method,
address entry_point,
intptr_t* parameters,