On Sat, 24 Oct 2026 01:19:39 GMT, Serguei Spitsyn <[email protected]> wrote:
>> This is a spec and implementation update for JVMTI `GetLocalObject` and >> `GetLocalInstance` functions related to getting the `this` object during >> value object construction. Current implementation is to return a snapshot of >> the `this` object. This update changes it to reject JVMTI `GetLocalObject` >> and `GetLocalInstance` functions with the error code >> `JVMTI_ERROR_OPAQUE_FRAME`. >> >> TBD: Will create a related CSR. >> >> Testing: >> - Run the impacted test before and after the fix: >> >> `test/hotspot/jtreg/serviceability/jvmti/valhalla/GetCtorLocal/ValueGetCtorLocal.java` >> - TBD: Run mach5 tiers 1-6 >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Serguei Spitsyn has updated the pull request incrementally with one > additional commit since the last revision: > > Restore preview problem list to upstream version src/hotspot/share/prims/jvmti.xml line 5921: > 5919: When preview features are enabled, if the local is the > "<code>this</code>" > 5920: object and "<code>this</code>" is a value object under > construction, the > 5921: function returns <code>JVMTI_ERROR_OPAQUE_FRAME</code>. records also have strict fields when compiled with preview features enabled (so future behavior). For JVMTI I think it will ended up being worded around strict fields, like we did for ForceEarlyReturnVoid. That function includes an API note to make the reader aware that value class rely on strict field initialization and I think can work here too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33526#discussion_r4386158819
