On Tue, 1 Sep 2026 20:20:22 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 with a new target base due to > a merge or a rebase. The pull request now contains 10 commits: > > - Merge branch 'master' into loader > - Add another test to show change of behavior > - Self review. > - Self review. > - Fix assert. > - Add a test to show that the class is still found in hprof even though > classes is not in ClassLoader. > - Make an assert to check that stale classes aren't in loader constraint > table, now that addClass() isn't called so no OOM possible. > - Fix comments. > - Fix copyrights. > - 8391308: Remove ClassLoader.classes vector and addClass call src/hotspot/share/classfile/systemDictionary.cpp line 1678: > 1676: k->class_loader_data()->add_to_deallocate_list(k); > 1677: } else if (HAS_PENDING_EXCEPTION) { > 1678: // Remove this InstanceKlass from the LoaderConstraintTable if > added. Suggestion: // Validate that this InstanceKlass is not present in the LoaderConstraintTable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32519#discussion_r3908085493
