RFR: 8361908: Mix and match of dead and valid exception handler leads to malformed class file

Adam Sotona asotona at openjdk.org
Fri Jul 11 14:16:45 UTC 2025


On Thu, 10 Jul 2025 21:47:35 GMT, Chen Liang <liach at openjdk.org> wrote:

> Noticed this error when I was verifying all sizes are u2 compatible and verified with a test that fails on mainline with ConstantPoolException (because we write a size of 2 with 1-length list content) and works in this patch. Problem wasn't discovered before because we use the `handlersSize < handlers.size()` instead of `handlersSize != handlers.size()` check.
> 
> Testing: jdk/jdk/classfile

Good catch!

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

Marked as reviewed by asotona (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26255#pullrequestreview-3010497724


More information about the core-libs-dev mailing list