RFR: 8224211:[lworld] Reflective method invocation fails with assert(sender_sp != sp()) failed: must have changed

Roland Westrelin rwestrel at redhat.com
Mon Jul 1 14:33:23 UTC 2019


http://cr.openjdk.java.net/~roland/8224211/webrev.00/

I couldn't reproduce the exact same failure. What I see is a SIGSEGV in
a checkcast in the interpreter. I found that when
StubGenerator::generate_call_stub() is called,
CompressedKlassPointers::base() and CompressedKlassPointers::shift() are
not yet set so code generated in case of a flattened return value is
incorrect. I propose the runtime pre-allocates a result buffer before
the call to java in case of a value type return and the call stub fills
it with the flattened return value (or discard it if we get a buffered
value from the call). With the current scheme a safepoint/exception
could happen on a value return and we were not sure how the call stub
would handle it. We don't have to worry about that with this change.

Roland.



More information about the valhalla-dev mailing list