Skip to content


8315698: Crash when comparing BasicType as int after JDK-8310577
Browse files Browse the repository at this point in the history
Reviewed-by: dlong, kvn, coleenp
  • Loading branch information
djelinski committed Sep 7, 2023
1 parent b05198a commit ab28300
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

// handle T_INT case
__ movl(Address(c_rarg0, 0), rax);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/stubRoutines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

1 comment on commit ab28300

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.