[foreign-abi] RFR: 8251047: GC stackwalking doesn't work when intrinsics are enabled [v3]

Jorn Vernee jvernee at openjdk.java.net
Mon Aug 24 15:12:44 UTC 2020


On Fri, 21 Aug 2020 22:59:56 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Thanks for the reviews.
>> 
>> When running the Upcalls benchmark I ran into another crash that looks related, so I'm looking into that before
>> integrating.
>
>> Explicitly save RBP location in thread anchor, so we can add it to the RegisterMap when jumping from the entry frame to
> 
> The fix looks good.
> 
> Still, IMO the best solution would be to adjust CallNative so it always kills RBP in case state transition is present.

@iwanowww Thanks for the review.

> Still, IMO the best solution would be to adjust CallNative so it always kills RBP in case state transition is present.

I'm already doing this, see the changes in lcm.cpp. RBP seems to need special handling beyond killing it in the IR.
Looking at some of the runtime stub code, these are also explicitly saving RBP and creating an oop map for it.

I have to look at this in more detail to figure out if we can refactor the current native call support to work more
like that of the runtime stubs. (though that adds a lot of indirection, so maybe it's worth it to try and remove the
special handling of RBP in the compiler instead, but that probably also touches more code and implicit assumptions).

I added a comment in the last revision that clarifies this, as well as only killing callee saved regs in case we are
actually doing a thread state transition.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/279


More information about the panama-dev mailing list