Skip to content

Commit

Permalink
svm: no longer disable Module#ensureNativeAccess [JDK-8331671]
Browse files Browse the repository at this point in the history
  • Loading branch information
zapster committed Nov 12, 2024
1 parent 8433dab commit 43aa600
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,9 @@ public boolean isNativeAccessEnabled() {
@TargetElement(onlyWith = JDK21OrEarlier.class)
public native void ensureNativeAccess(Class<?> owner, String methodName);

/**
* Allow all native access. This is a workaround for JDK-8331671 until we have a better
* solution. (GR-57608)
*/
@Substitute
@Alias
@TargetElement(onlyWith = JDKLatest.class)
public void ensureNativeAccess(Class<?> owner, String methodName, Class<?> currentClass, boolean jni) {
/* Do Nothing */
}
public native void ensureNativeAccess(Class<?> owner, String methodName, Class<?> currentClass, boolean jni);

@Substitute
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+10/src/hotspot/share/classfile/modules.cpp#L275-L479")
Expand Down

0 comments on commit 43aa600

Please sign in to comment.