FAILURE MAP
← Case archive

FA-89963 / Bytecode virtual machines / Member archive

Exception tables: narrowest range preferred over table order · case 03

Where a wide handler is listed before a narrow one, the narrow handler wins.

Member previewVariant 3 · 3 implementations · 10 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: first matching entry in table order wins{"handler": 200, "stack": ["FileNotFoundException"], "unwound": 0}{"handler": 100, "stack": ["FileNotFoundException"], "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 ↗