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 01:33:47 UTC 2020


Thanks Jesper.

Also fixed copyright year in jni.cpp :)

David

On 5/02/2020 11:25 am, Jesper Wilhelmsson wrote:
> Looks good.
> /Jesper
> 
>> On 5 Feb 2020, at 01:41, David Holmes <david.holmes at oracle.com> wrote:
>>
>> 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