RFR (S): 8239593: Bogus warning "Re-registering of platform native method" for a JVMTI agent

David Holmes david.holmes at oracle.com
Wed Mar 11 02:08:45 UTC 2020


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

The original intent was to warn if changes were being made to platform 
classes by non-platform classes. That was weakened slightly to warn if 
classes loaded by the boot/platform loaders were modified by a class not 
loaded by the boot/platform loader. But that formulation also catches 
non-platform classes that have been added to the bootclasspath. So we 
augment the check to also check that the target class is in a named 
module** (loaded by the boot/platform loader) - this ensures we catch 
changes to platform files whilst excluding classes incidentally on the 
bootclasspath.

** Note that you cannot add a named module to the boot/platform loaders 
at runtime - they are defined at build time.

Tested against Yourkit reproducer in the bug report, and with existing 
registerNatives test.

Test builds on tier1 platforms.

Thanks,
David


More information about the hotspot-runtime-dev mailing list