RFR (S): 8238460: Provide warnings about the use of JNI RegisterNatives to rebind native methods for boot/platform classes in other classloaders

David Holmes david.holmes at oracle.com
Wed Feb 5 00:41:17 UTC 2020


bug: https://bugs.openjdk.java.net/browse/JDK-8238460
webrev: http://cr.openjdk.java.net/~dholmes/8238460/webrev/

This small enhancement adds some usage warnings to the JNI specification 
- see details in bug report - and a runtime warning in the JNI 
RegisterNatives code, covering the case where platform native methods 
get rebound by code that is not part of the platform. This is needed by 
native agents, but may be unexpected in other contexts, hence a warning 
is issued.

A test is added to exercise the warning.

Other testing: tiers 1-3

The actual spec edit is not part of this RFR as the specs themselves are 
not open-source.

Thanks,
David


More information about the hotspot-runtime-dev mailing list