RFR: 8327624: Remove VM implementation that bypass verification for core reflection
Mandy Chung
mchung at openjdk.org
Thu Oct 17 20:49:46 UTC 2024
The old core reflection implementation generates dynamic classes that are special cases in the VM to bypass bytecode verification to workaround various issues [1] [2] [3] uncovered over time.
The old core reflection implementation was [removed in JDK 22](https://bugs.openjdk.org/browse/JDK-8305104). These VM hacks can be removed together with the old implementation of `sun.reflect.ReflectionFactory::newConstructorForSerialization`. In addition, the special metaspace for reflection can also be removed. I will create a separate issue to remove `Metaspace::ReflectionMetaspaceType` and update existing GTests together.
[1] [JDK-4486457](https://bugs.openjdk.org/browse/JDK-4486457)
[2] [JDK-4474172](https://bugs.openjdk.org/browse/JDK-4474172)
[3] [JDK-6790209](https://bugs.openjdk.org/browse/JDK-6790209)
-------------
Commit messages:
- 8327624: Remove VM implementation that bypass verification for core reflection
Changes: https://git.openjdk.org/jdk/pull/21571/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21571&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8327624
Stats: 981 lines in 17 files changed: 0 ins; 973 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/21571.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21571/head:pull/21571
PR: https://git.openjdk.org/jdk/pull/21571
More information about the core-libs-dev
mailing list