RFR: 8287233: Crash in Continuation.enterSpecial: stop: tried to execute native method as non-native
David Holmes
dholmes at openjdk.java.net
Tue May 31 01:50:35 UTC 2022
On Fri, 27 May 2022 15:53:25 GMT, Ron Pressler <rpressler at openjdk.org> wrote:
> Please review this fix to a continuation-related crash that happens due to a race between the linking and generation of Continuation.enterSpecial.
>
> Passes Loom tiers 1-5.
I have one suggested change below, but in general enforcing strict storestore ordering seems to address the issue observed.
Thanks.
src/hotspot/share/oops/method.cpp line 1335:
> 1333: // This must come last, as it is what's tested in LinkResolver::resolve_static_call
> 1334: mh->_from_interpreted_entry = mh->get_i2c_entry();
> 1335: OrderAccess::storestore();
Technically this needs a release-store to pair with the load-acquire.
But what subsequent store is this final store being ordered with? If there is none then it would suffice for this sequence to be just:
mh->_i2i_entry = mh->get_i2c_entry();
// This must come last, as it is what's tested in LinkResolver::resolve_static_call
Atomic::release_store(&mh->_from_interpreted_entry , mh->get_i2c_entry());
-------------
Changes requested by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/8926
More information about the hotspot-dev
mailing list