On Fri, 11 Sep 2026 17:34:48 GMT, Coleen Phillimore <[email protected]> wrote:
>> Remove the upcall to addClass during class loading. The comment says it's >> only so GC can keep classes alive while the class loader is alive. We have >> other ways to do that. There were some JVMTI tests in the past that failed >> without this vector but today seems to be only one test. Maybe there's some >> code that has a dependency on this in heap walking. >> Tested tier1-6 >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Coleen Phillimore has updated the pull request incrementally with one > additional commit since the last revision: > > Use Alan's suggested spec changes. src/hotspot/share/classfile/loaderConstraints.cpp line 454: > 452: Symbol* name = klass->name(); > 453: LoaderConstraint* p = find_loader_constraint(name, loader); > 454: assert (p == nullptr || p->klass() == klass, "pointer to class that > failed to load"); The assert condition is suspicious. Let's double check it. My guess is that it has to be an inverted version of the removed condition at line 453. If so, then it has to be something like: p == nullptr || p->klass() == nullptr || p->klass() != klass It is `p->klass() == klass` instead of `p->klass() != klass`. Also, I'm not sure why this check is missed: `p->klass() == nullptr`. Of course, I'm not sure, my guess is right. src/hotspot/share/prims/jvmti.xml line 4293: > 4291: Agent supplied callback function. > 4292: Describes a reference from an object or the VM (the referrer) > to another object > 4293: (the referree) or a heap root. I'd like to double-check this change is right. It feels like the original version was right. Heap root is a referrer, not referee. So, "a reference from a heap root to a referree" sounds right to me. Also, should `referree` be spelled as `referee`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32519#discussion_r3995490546 PR Review Comment: https://git.openjdk.org/jdk/pull/32519#discussion_r3995511106
