[lworld] RFR: 8336682: [lworld] java/lang/instrument/IsModifiableClassAgent.java test fails when run with migrates classes
Dan Heidinga
heidinga at openjdk.org
Fri Jul 19 16:14:48 UTC 2024
On Fri, 19 Jul 2024 14:24:21 GMT, Frederic Parain <fparain at openjdk.org> wrote:
> However, I'm wondering if class redefinition should reject redefined classes with a missing or different LoadableDescriptors attribute. This attribute helps the VM optimizing this class, but it is not supposed to impact the semantic of the class.
I don't think we need to reject classes with missing or different LD attributes. The attribute provides the VM an option to load classes earlier than it otherwise would but doesn't enforce a requirement. I see this as being similar to redefining the `<clinit>` method: perfectly valid to do but will have no effect if the class has already been initialized.
Changing the LD attribute may give the VM permission to preload different classes but doesn't affect decisions already made (like changing `<clinit`>) and doesn't impact the integrity of the VM (like changing NestMates). So I don't think it should be validated.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1172#issuecomment-2239530053
More information about the valhalla-dev
mailing list