RFR: 8344003: WB: Add option to skip clinit during class loading for testing

Evgeny Nikitin enikitin at openjdk.org
Tue Nov 12 08:24:36 UTC 2024


This PR adds a White-Box controlled option to skip `clinit` methods during class loading.
Such a feature would allow for non-executing testing techniques of random and untrusted jars/classes in CI systems without being afraid of breaking or harming the running system.

The clinit skipping does not affect core libraries (i.e. those under `java`, `jdk` and `sun` packages), and will only be available in debug builds.

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

Commit messages:
 - 8344003: WB: Add option to skip clinit during class loading for testing

Changes: https://git.openjdk.org/jdk/pull/22030/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22030&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8344003
  Stats: 75 lines in 5 files changed: 71 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/22030.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22030/head:pull/22030

PR: https://git.openjdk.org/jdk/pull/22030


More information about the hotspot-dev mailing list