On Mon, 2 Nov 2020 21:00:23 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

> Erik,
> 
> Thank you for the update! It looks more elegant.
> 
> One concern is that after the move of this fragment to the 
> post_method_exit_inner:
> 
> ```
> 1614   if (state == NULL || !state->is_interp_only_mode()) {
> 1615     // for any thread that actually wants method exit, interp_only_mode 
> is set
> 1616     return;
> 1617   }
> ```
> 
> there is no guarantee that the current frame is interpreted below:
> 
> ```
> 1580     if (!exception_exit) {
> 1581       oop oop_result;
> 1582       BasicType type = 
> current_frame.interpreter_frame_result(&oop_result, &value);
>  . . .
> 1597   if (result.not_null() && !mh->is_native()) {
> 1598     // We have to restore the oop on the stack for interpreter frames
> 1599     *(oop*)current_frame.interpreter_frame_tos_address() = result();
> 1600   }
> ```
> 
> Probably, extra checks for current_frame.is_interpreted_frame() in these 
> fragments will be sufficient.

That makes sense. Added a check in the latest version that we are in interp 
only mode.

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

PR: https://git.openjdk.java.net/jdk/pull/930

Reply via email to