RFR: 8318940: [JVMCI] do not set HotSpotNmethod oop for a default HotSpotNmethod
Doug Simon
dnsimon at openjdk.org
Tue Oct 31 14:16:35 UTC 2023
On Thu, 26 Oct 2023 22:07:04 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> The code in `c2v_translate` for translating a `HotSpotNmethod` object from the libgraal heap to the HotSpot heap has a bug where it is setting the oop slot in an `nmethod` that ties the lifetime of the `HotSpotNmethod` object to the associated `nmethod`. Roughly speaking, when the `HotSpotNmethod` object becomes garbage, the `nmethod` is unloaded.
>
> This relationship is only maintained for [non-default HotSpotNmethods](https://github.com/openjdk/jdk/blob/77fe0fd9e6f1e1f775a5191640411c37eb51b415/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotNmethod.java#L47-L54). For a default `HotSpotNmethod`, no such oop slot exists and so it must not be set. This PR makes that fix.
Thanks for the reviews.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16386#issuecomment-1787304140
More information about the hotspot-compiler-dev
mailing list