[jdk20] RFR: 8298400: Virtual thread instability when stack overflows [v2]

Ron Pressler rpressler at openjdk.org
Thu Jan 19 15:25:45 UTC 2023


On Thu, 19 Jan 2023 15:19:34 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> Ron Pressler has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add corresponding change to riscv
>
> I was still testing.
> 
> FTR
> 
> 
> diff --git a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
> index 2cd3323f181..27e2bae6ab7 100644
> --- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
> +++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
> @@ -1990,6 +1990,19 @@ static void gen_continuation_yield(MacroAssembler* masm,
>  
>    __ bind(L_pinned); // pinned -- return to caller
>  
> +  // handle pending exception thrown by freeze
> +  Label ok;
> +  __ ld(tmp, in_bytes(JavaThread::pending_exception_offset()), R16_thread);
> +  __ cmpdi(CCR0, tmp, 0);
> +  __ beq(CCR0, ok);
> +  __ pop_frame();
> +  __ ld(R0, _abi0(lr), R1_SP); // Return pc
> +  __ mtlr(R0);
> +  __ load_const_optimized(tmp, StubRoutines::forward_exception_entry(), R0);
> +  __ mtctr(tmp);
> +  __ bctr();
> +  __ bind(ok);
> +
>    // Pop frame and return
>    __ pop_frame();
>    __ ld(R0, _abi0(lr), R1_SP); // Return pc

@reinrich The integration failed for some reason, so I'll try adding that as well.

-------------

PR: https://git.openjdk.org/jdk20/pull/101


More information about the hotspot-compiler-dev mailing list