On Tue, 27 Oct 2026 07:50:05 GMT, Alan Bateman <[email protected]> wrote:
>> 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/jvmtiImpl.cpp line 624:
>
>> 622: bool is_ctor = _jvf->method()->is_object_constructor();
>> 623: if (is_ctor && _index == 0 &&
>> _jvf->method()->method_holder()->has_strict_instance_fields_in_hierarchy()) {
>> 624: _result = JVMTI_ERROR_OPAQUE_FRAME; // no support for
>> THIS value object during construction
>
> I think you'll need a lot more test cases to help see if a stack walk is
> required here. I'm thinking about invoking an instance method from a
> constructor after strict fields have been set and after super(). Also
> thinking about cases where the strict fields are in a super class or subclass.
I've added new test
`serviceability/jvmti/valhalla/GetCtorLocal/GetCtorLocalStrictInitFields.java`
which has been converted from the `ForceEarlyReturn` test:
`serviceability/jvmti/ForceEarlyReturn/ForceEarlyReturnStrictInitFields.java`
by replacing the JVMTI `ForceEarlyReturnVoid` with the
`GetLocalInstance/GetLocalObject` calls and removal of class initializer test
cases. Also, the classes `ConstructorBeforeAndAfterSuper2` and
`ConstructorBeforeAndAfterSuper3` have been updated by adding two new methods:
`superClassMethod()` and `testClassMethod()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33526#discussion_r4624526563