[lworld] RFR: 8274800: [lworld] Primitive classes can't be retransformed
Serguei Spitsyn
sspitsyn at openjdk.java.net
Wed Dec 8 13:44:40 UTC 2021
On Wed, 8 Dec 2021 01:20:43 GMT, Frederic Parain <fparain at openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp line 886:
>>
>>> 884:
>>> 885: // JVMSpec| u2 access_flags;
>>> 886: write_u2(ik()->access_flags().get_flags() & (JVM_RECOGNIZED_CLASS_MODIFIERS | JVM_ACC_INLINE));
>>
>> Would it better to consider adding JVM_ACC_INLINE to JVM_RECOGNIZED_CLASS_MODIFIERS?
>> Also, I see other definitions of the JVM_RECOGNIZED_CLASS_MODIFIERS in files:
>>
>> src/hotspot/share/include/jvm_constants.h
>> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java
>>
>> Do we want this modifier added there as well?
>
> The problem is that JVM_RECOGNIZED_CLASS_MODIFIERS contains all modifiers defined for JDK8 and earlier, but the validity of new modifiers depends on class file version (see classFileParser.cpp where JVM_RECOGNIZED_CLASS_MODIFIERS is also used).
Thanks, Frederic. Of course, it is always possible to add this modifier conditionally depending on the release. But it is not that elegant.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/588
More information about the valhalla-dev
mailing list