FA-90275 / Bytecode virtual machines / Member archive
Switch dispatch: high bound handled by default · case 05
The last case of every tableswitch is unreachable.
Case contract
code is a method's bytes; at addr is tableswitch (0xAA) or lookupswitch (0xAB). After the opcode, 0-3 padding bytes align the next byte to a multiple of 4 from the method start; then big-endian signed 32-bit words: default, and either low, high and high-low+1 offsets, or npairs followed by sorted (match, offset) pairs. Branch offsets are relative to the switch opcode address. Return the target address, or ["VerifyError", reason] for low > high, negative npairs, keys not strictly increasing, another opcode, or truncated operands.
Why this case matters
Switch opcodes combine alignment, signed decoding and relative targets in one instruction.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| tableswitch hit at the high bound | -3 | 55 | 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 ↗