RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop

Richard Reingruber rrich at openjdk.java.net
Fri Oct 30 18:40:56 UTC 2020


On Fri, 30 Oct 2020 16:38:40 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

> I think what you are saying is true. Note though that the return value of
> ForceEarlyReturn is installed with a handshake. The handshake polls of the
> interpreter are emitted in loop backedges and returns

Yes right, I wasn't really aware of this. The thread has to be suspended though
before the forced return (with a vm operation).

> I gotta say I have no idea why there is a call to clear the expression stack
> at all in TemplateInterpreterGenerator::generate_earlyret_entry_for(). It is
> unclear to me what problem if any that solves.

Don't really know either. Only thing I currently can think of is that the
expression stack could overflow, not on x86 though.

> Anyway, I think this is a separate bug. Do you mind if I push the fix for that
> bug, as a different RFR?

Not at all.

> It will likely involve poking around at more platform dependent code.

Likely. Another solution might be to delay loading the return value until the
activation is removed.

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

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


More information about the serviceability-dev mailing list