FAILURE MAP
← Case archive

FA-90264 / Bytecode virtual machines / Member archive

Switch dispatch: table offsets added to the aligned operand address · case 04

Matching cases land a few bytes past their intended targets.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

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 fixture

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

Boundary fixtureActualExpectedOutcome
regression: tableswitch hit with aligned operands6059Failed

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 ↗