On Thu, 12 Nov 2026 20:21:08 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`. >> >> The CSR is: [JDK-8397026](https://bugs.openjdk.org/browse/JDK-8397026): >> GetLocalInstance should return OPAQUE_FRAME for objects with strict-init >> fields >> >> Testing: >> - Run the impacted test before and after the fix: >> >> `test/hotspot/jtreg/serviceability/jvmti/valhalla/GetCtorLocal/ValueGetCtorLocal.java` >> - mach5 tiers 1-6 are GREEN >> >> --------- >> - [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: > > change the wording in jvmti.xml to say about slot zero The spec changes an JVMTI changes look good. In the new test, there is no test case to make sure GetLocalObject of a non-zero slot works when in the constructor of an object with strictly initialized fields. test/hotspot/jtreg/serviceability/jvmti/valhalla/GetCtorLocal/GetCtorLocalStrictInitFields.java line 84: > 82: while (!ready) { > 83: Thread.sleep(10); > 84: } It the thread throws an exception before setting ready, eventually the harness will timeout and the exception will not be reported by the assertNull below. You could avoid the timeout by checking in the loop if there was an exception thrown. ------------- PR Review: https://git.openjdk.org/jdk/pull/33526#pullrequestreview-5964652801 PR Review Comment: https://git.openjdk.org/jdk/pull/33526#discussion_r4620444561
