The code in c2v_translate for translating a HotSpotNmethod object from the libgraal heap to the HotSpot heap has a bug whereby it is setting the oop slot in an nmethod that is meant to tie the lifetime of the HotSpotNmethod object to the nmethod. When the HotSpotNmethod object becomes garbage, the nmethod is unloaded.
This relationship is only maintained for non-default[1] HotSpotNmethods. For a default HotSpotNmethod, no such oop slot exists and so it should not be set.
[1] https://github.com/openjdk/jdk/blob/77fe0fd9e6f1e1f775a5191640411c37eb51b415/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotNmethod.java#L47-L54
This relationship is only maintained for non-default[1] HotSpotNmethods. For a default HotSpotNmethod, no such oop slot exists and so it should not be set.
[1] https://github.com/openjdk/jdk/blob/77fe0fd9e6f1e1f775a5191640411c37eb51b415/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotNmethod.java#L47-L54
- links to
-
Commit openjdk/jdk/7452d50b
-
Review(master) openjdk/jdk/16386