On Tue, 15 Apr 2025 19:49:55 GMT, Matias Saavedra Silva <matsa...@openjdk.org> wrote:
>> Ioi Lam has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains two additional commits >> since the last revision: >> >> - Merge branch 'master' into >> 8352001-exclude-injected-classes-from-builtin-loaders >> - 8352001: AOT cache should not contain classes injected into built-in >> class loaders > > test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/FakeCodeLocation.java > line 122: > >> 120: // Define a class using Lookup.defineClass(). The ClassFileParser >> should see "__JVM_DefineClass__" >> 121: // as the source location, so this class will be excluded, as the >> location is not supported. >> 122: static void testWithLookup() throws Exception { > > Should this test capture some kind of output or exception? These classes are still loadable (just not from the CDS archive), so there aren't exceptions printed here. These lines check that the classes are not loaded from CDS: public void checkExecution(OutputAnalyzer out, RunMode runMode) throws Exception { if (isDumping(runMode)) { out.shouldMatch("cds,class.* FakeCodeLocationApp"); out.shouldNotMatch("cds,class.* ClassNotInJar1"); out.shouldNotMatch("cds,class.* ClassNotInJar2"); } if (runMode.isProductionRun()) { out.shouldMatch("class,load.* FakeCodeLocationApp .*source: shared objects file"); out.shouldNotMatch("class,load.* ClassNotInJar1 .*source: shared objects file"); out.shouldNotMatch("class,load.* ClassNotInJar2 .*source: shared objects file"); } } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24046#discussion_r2045799211