FA-89968 / Bytecode virtual machines / Member archive
Exception tables: handler requires the exact thrown type · case 03
catch (IOException) no longer catches FileNotFoundException.
Case contract
frames are ordered outermost first; the innermost frame carries the faulting pc, every caller carries the return address "ret" and the invoke opcode "via" (invokeinterface and invokedynamic are 5 bytes, other invokes 3), and the lookup pc is the invoke's own address. Each table entry [start, end, handler, type] covers start <= pc < end; entries are tried in table order; type None catches anything, otherwise the thrown type or any ancestor (parents map) must equal it. Return handler, number of frames unwound and the operand stack at the handler (cleared, then the exception pushed).
Why this case matters
Exception dispatch correctness depends on half-open ranges, table order, type hierarchy and pc attribution.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| range start is inclusive | {"handler": null, "stack": [], "unwound": 1} | {"handler": 300, "stack": ["ArithmeticException"], "unwound": 0} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗