[lworld] RFR: 8327257: [lworld] Tests are needed to stress class preloading with concurrent class loadings [v2]

Paul Hübner phubner at openjdk.org
Tue Sep 9 11:29:28 UTC 2025


> Hi all,
> 
> This change strengthens our Valhalla-specific classloading test suite and guards against regressions. An overview of the new changes is as follows:
> * `BigClassTreeClassLoader`: a utility classloader that generates huge class trees on the fly. The idea is to generate a tree that is deep (lots of parent classes) and very wide (classes have lots of value classes as fields, which have value class fields, etc.). 
> * `ConcurrentClassLoadingTest` strains the classloading and preloading by classloading many classes at the same time.
> * `LoadableDescriptorsTest` ensures that the `LoadableDescriptors` attribute can handle unexpected data. This may need to be revisited if https://bugs.openjdk.org/browse/JDK-8366907 changes the semantics.
> * `PreLoadCircularityTest` ensures that preloading happens even when there are cycles (via inheritance, fields, and both). 
> * `PreLoadDoesNotInitTest` is a regression test that ensures preloading will not initialize a class.
> * `PreLoadFailuresDoNotImpactApplicationTest` ensures that a flaky classloader during preloading will not cause crashes as long as the classloader can find the class when it is actually used.
> * `ValueClassInheritanceTest` is a regression test that ensures one cannot have a value class inherit from something that's not an abstract value class.

Paul Hübner has updated the pull request incrementally with three additional commits since the last revision:

 - Adjust stress rate.
 - Re-enable test.
 - Increase concurrent loading iterations.

-------------

Changes:
  - all: https://git.openjdk.org/valhalla/pull/1552/files
  - new: https://git.openjdk.org/valhalla/pull/1552/files/68324e4b..9df98b53

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1552&range=01
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1552&range=00-01

  Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/valhalla/pull/1552.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1552/head:pull/1552

PR: https://git.openjdk.org/valhalla/pull/1552


More information about the valhalla-dev mailing list