FAILURE MAP
← Case archive

FA-89867 / Bytecode virtual machines / Member archive

JVM int32 opcodes: wraparound leaves 0x80000000 positive · case 02

Overflowing MAX_VALUE + 1 reports 2147483648 instead of MIN_VALUE.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Each op is [name, a, b] over 32-bit two's complement ints: iadd/imul wrap; idiv truncates toward zero and MIN_VALUE / -1 wraps to MIN_VALUE; irem has the sign of the dividend; ishl/ishr/iushr use only the low five bits of the shift count, iushr shifts in zeros; ineg wraps. Division by zero yields "ArithmeticException", an unknown op "VerifyError".

Why this case matters

Bytecode integer opcodes must reproduce fixed-width semantics that host-language integers do not.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression: iadd reaching MAX_VALUE[2147483647, 2147483648][2147483647, -2147483648]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 ↗