8371949: Upcall exception handler crashes with bad oop

Reviewed-by: jvernee, dholmes
This commit is contained in:
Aleksey Shipilev 2026-05-18 08:30:35 +00:00
parent 8ebea6c05e
commit a2b9e941d6
3 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ void UpcallLinker::on_exit(UpcallStub::FrameData* context) {
JNIHandleBlock::release_block(context->new_handles, thread);
}
void UpcallLinker::handle_uncaught_exception(oop exception) {
void UpcallLinker::handle_uncaught_exception(oopDesc* exception) {
tty->print_cr("Uncaught exception:");
Handle exception_h(Thread::current(), exception);
java_lang_Throwable::print_stack_trace(exception_h, tty);

View File

@ -44,7 +44,7 @@ public:
bool needs_return_buffer, int ret_buf_size);
// public for stubGenerator
static void handle_uncaught_exception(oop exception);
static void handle_uncaught_exception(oopDesc* exception);
};
#endif // SHARE_VM_PRIMS_UPCALLLINKER_HPP

View File

@ -24,7 +24,7 @@
/*
* @test
* @requires jdk.foreign.linker != "FALLBACK"
* @requires (os.arch == "aarch64" | os.arch=="riscv64") & os.name == "Linux"
* @requires (os.arch == "aarch64" | os.arch=="riscv64" | os.arch=="x86_64" | os.arch=="amd64") & os.name == "Linux"
* @requires os.maxMemory > 4G
* @requires vm.compMode != "Xcomp"
* @modules java.base/jdk.internal.foreign