[jdk8u-dev] RFR: 8364660: ClassVerifier::ends_in_athrow() should be removed
Andrew John Hughes
andrew at openjdk.org
Wed Dec 17 14:29:59 UTC 2025
This backport removes the `ends_in_athrow` check which has been obsoleted by [JDK-8302497](https://bugs.openjdk.org/browse/JDK-83024970), specifically:
"There is no way to perform a return instruction given that type state, so the handler would have to throw another exception (or loop forever). In fact, it's not even possible to express a handler with that type state, because there is no way for a stack frame, as expressed by the StackMapTable attribute ([4.7.4](https://docs.oracle.com/javase/specs/jvms/se22/html/jvms-4.html#jvms-4.7.4)), to carry flagThisUninit without any accompanying use of type uninitializedThis." [0]
The backport is mostly clean, with the following exceptions:
1. The removed code in `verifier.cpp` used `round_to` rather than `align_up` in setting `aligned_bcp` ([JDK-8178500](https://bugs.openjdk.org/browse/JDK-8178500) absent).
2. The removed code in `verifier.cpp` used `VerboseVerification` and `tty->print_cr` rather than the newer unified logging system ([JDK-8150083](https://bugs.openjdk.org/browse/JDK-8150083) absent)
3. The copyright header of `verifier.hpp` was older in 8u.
[0] https://cr.openjdk.org/~dlsmith/8302497/8302497-20231218/specs/invokespecial-verification-jvms.html
-------------
Commit messages:
- Backport 705236baf53a76f0beb7be29fe45b68b7999fc7e
Changes: https://git.openjdk.org/jdk8u-dev/pull/735/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=735&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8364660
Stats: 242 lines in 2 files changed: 0 ins; 241 del; 1 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/735.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/735/head:pull/735
PR: https://git.openjdk.org/jdk8u-dev/pull/735
More information about the jdk8u-dev
mailing list