Integrated: 8318940: [JVMCI] do not set HotSpotNmethod oop for a default HotSpotNmethod

Doug Simon dnsimon at openjdk.org
Tue Oct 31 14:19:43 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.

This pull request has now been integrated.

Changeset: 7452d50b
Author:    Doug Simon <dnsimon at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/7452d50be58cfa8e97c57ca145a809409945f883
Stats:     6 lines in 2 files changed: 0 ins; 0 del; 6 mod

8318940: [JVMCI] do not set HotSpotNmethod oop for a default HotSpotNmethod

Reviewed-by: thartmann, never

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

PR: https://git.openjdk.org/jdk/pull/16386


More information about the hotspot-compiler-dev mailing list