On Thu, 6 Aug 2026 13:41:47 GMT, Markus Grönlund <[email protected]> wrote:
>> src/hotspot/share/cds/lambdaProxyClassDictionary.cpp line 350:
>>
>>> 348: {
>>> 349: // This construct is a scoped helper class, placed here to capture
>>> early returns.
>>> 350: JFR_ONLY(JfrDefineClassEvent class_define_event(loaded_lambda,
>>> THREAD);)
>>
>> I actually think this comment is unnecessary as we have lots of scoped
>> object classes, but why is it needed at the beginning of the loading process
>> would make a good comment.
>> // Capture loading state at the beginning or something.
>
> The comment is there to prevent someone accidentally moving this below a
> CHECK macro or introducing a CHECK macro above it. That would lead to a
> Symbol leak.
That is true for all of the RAII types tho. I mean that's the reason for many
of them.
>> src/hotspot/share/classfile/systemDictionary.cpp line 861:
>>
>>> 859: CHECK_NULL);
>>> 860: assert(k != nullptr, "no klass created");
>>> 861: assert(k->class_loader_data() == loader_data, "invariant");
>>
>> I don't think this is necessarily true.
>
> In what case would it not be?
It might not be now, but I don't see why you couldn't have an non-strong hidden
class from another class loader. I thought that was possible now tbh.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32218#discussion_r3735704776
PR Review Comment: https://git.openjdk.org/jdk/pull/32218#discussion_r3735702948