JDK-8191118 : [Nestmates] Class redefinition must preclude changes to nest attributes
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: repo-valhalla
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-11-13
  • Updated: 2018-05-15
  • Resolved: 2018-03-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-valhallaFixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8196311 :  
Description
Impacts redefinition and retransformation.

Affects JVM TI, and JDWP/JDI (com.sun.jdi.VirtualMachine.redefineClasses).

Comments
Changeset: 6b7a68f4c423 Author: sspitsyn Date: 2018-03-26 02:21 -0400 URL: http://hg.openjdk.java.net/valhalla/valhalla/rev/6b7a68f4c423 8191118: [Nestmates] Class redefinition must preclude changes to nest attributes Summary: Implementation changes and tests for JVM TI redefinition not allowing changing of the nestmate attributes Reviewed-by: dholmes ! src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp ! src/hotspot/share/prims/jvmtiClassFileReconstituter.hpp ! src/hotspot/share/prims/jvmtiRedefineClasses.cpp ! src/hotspot/share/prims/jvmtiRedefineClasses.hpp ! src/java.instrument/share/native/libinstrument/JavaExceptions.c ! src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java ! src/jdk.jdwp.agent/share/native/libjdwp/error_messages.c ! src/jdk.jdwp.agent/share/native/libjdwp/util.c + test/jdk/java/lang/instrument/RedefineNestmateAttr/Host/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/Host/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostA/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostA/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostAB/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostAB/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostABC/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostABC/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostABCD/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostABD/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostAC/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostACB/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostB/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostBA/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostBAC/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostBCA/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostCAB/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/HostCBA/redef/Host.java + test/jdk/java/lang/instrument/RedefineNestmateAttr/TestNestmateAttr.java
26-03-2018

Re-assigned this enhancement to myself as we agreed with David.
21-12-2017

I previously wrote: There is also the problem of the Class File Load Hook (CFLH) during the "initial load". It appears there is an undocumented feature that the initial load is not subject to any of the constraints imposed on redefinition or retransformation! http://mail.openjdk.java.net/pipermail/serviceability-dev/2017-October/022026.html -- But this issue was just my misunderstanding. At initial load the VM has no idea whether the byte[] for the class has been modified in some way since being read from a .class file (even assuming it was read from such a file). So any changes can be made at that time.
21-12-2017

EG proposal: http://mail.openjdk.java.net/pipermail/valhalla-spec-experts/2017-December/000485.html Result: The Valhalla Expert Group meeting today agreed on the proposal to NOT allow redefinition to change the NestHost attribute or to change the NestMembers attribute for our initial nestmates release.
21-12-2017