RFR: 8366488: JVM_FindClassFromClass should assert that from class is never null [v2]

Paul Hübner phubner at openjdk.org
Tue Oct 28 14:02:06 UTC 2025


> Hi all,
> 
> The `from_class` nullcheck  in `JVM_FindClassFromClass` is redundant, as the this is the Java mirror which cannot be null during class linking/verification [1]. Therefore, it has been refactored to be an assertion instead.
> 
> Testing: tiers 1-4 Linux (x64, AArch64), macOS (x64, AArch64), Windows (x64). As part of a separate experiment, I've also run tiers 1-6 on x64 Linux with a non-null assertion before we call `Verifier::inference_verify` (which in turn, eventually, calls this code).
> 
> [1] For reasoning, see https://bugs.openjdk.org/browse/JDK-8366488

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

  Turn conditional into assert.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27957/files
  - new: https://git.openjdk.org/jdk/pull/27957/files/0ac6d29c..b4b81474

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

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

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


More information about the hotspot-dev mailing list