On Thu, 19 Nov 2026 19:08:26 GMT, Chris Plummer <[email protected]> wrote:
> Adapt to [JDK-8395356](https://bugs.openjdk.org/browse/JDK-8395356), which > changed JVMTI to no longer support returning a clone for "this" when in a > constructor, and instead throwing JVMTI_ERROR_OPAQUE_FRAME. This is mostly a > spec update, with one minor (and not strictly necessary) code change. I still > need to work on test cases. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). The jdb can be impacted by changes in behavior and may need an update. Now, the calls to `frame.thisObject()` can throw the `OpaqueFrameException`. src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java line 112: > 110: * @return an {@link ObjectReference}, or null if the frame > represents > 111: * a native or static method. > 112: * @throws OpaqueFrameException if the this stack frame is for a > constructor whose Nit: A typo: `the this stack frame` => `this stack frame`. src/jdk.jdi/share/classes/com/sun/tools/jdi/StackFrameImpl.java line 254: > 252: throw new InvalidStackFrameException(); > 253: case JDWP.Error.OPAQUE_FRAME: > 254: throw new InternalException("Unexpected OPAQUE_FRAME > error"); Nit: This needs a short comment about why is is unexpected. Say something that `OPAQUE_FRAME` can be returned for slot 0 which has to be filtered out from the list of locals. ------------- PR Review: https://git.openjdk.org/jdk/pull/33977#pullrequestreview-5985938001 PR Review Comment: https://git.openjdk.org/jdk/pull/33977#discussion_r4638510137 PR Review Comment: https://git.openjdk.org/jdk/pull/33977#discussion_r4637196311
