oracle/graal · error · IllegalArgumentException
Unknown jump table entry format:
Error message
Unknown jump table entry format:
What it means
HexCodeFileDis throws this IllegalArgumentException when rendering a jump table whose entryFormat is neither OFFSET nor KEY2_OFFSET. Jump-table metadata embedded in a HexCodeFile describes how each entry encodes its target (plain 4-byte offset, or key2 plus offset); an unknown enum constant means the file's jump-table annotation uses a format this parser version does not understand. It is a data/version mismatch, not a runtime decoding failure.
Source
Thrown at compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/disassembler/HexCodeFileDis.java:163
EntryFormat entryFormat = jumpTable.entryFormat;
int entrySize = entryFormat.size;
Instruction lastInsn = insns.get(insns.size() - 1);
long entries = Math.abs(jumpTable.high - (long) jumpTable.low);
for (int i = 0; i <= entries; i++) {
int entryOffset = jumpTable.getPosition() + i * entrySize;
Integer secondaryKey;
int targetOffsetRelativeToJumpTable;
switch (jumpTable.entryFormat) {
case OFFSET:
secondaryKey = null;
targetOffsetRelativeToJumpTable = readInt(dis.isLittleEndian(), hcf.code, entryOffset);
break;
case KEY2_OFFSET:
secondaryKey = readInt(dis.isLittleEndian(), hcf.code, entryOffset);
targetOffsetRelativeToJumpTable = readInt(dis.isLittleEndian(), hcf.code, entryOffset + 4);
break;
default:
throw new IllegalArgumentException("Unknown jump table entry format: " + jumpTable.entryFormat);
}
int primaryKey = jumpTable.low + i;
long target = hcf.startAddress + jumpTableOffset + targetOffsetRelativeToJumpTable;
lastInsn.jumpTable.add(new JumpTableEntry(entryOffset, hcf.startAddress + entryOffset, primaryKey, secondaryKey, target));
}
long newStartOffset = jumpTableOffset + entrySize * (jumpTable.high - (long) jumpTable.low + 1);
startOffset = (int) newStartOffset;
assert startOffset == newStartOffset;
}
if (startOffset < hcf.code.length) {
for (Instruction i : disassembleAtOffset(hcf, dis, startOffset, hcf.code.length)) {
instructionMap.put(i.getOffset(), i);
}
}
}
Width labelWidth = new Width(1);View on GitHub (pinned to a66e9ccd1d)
Solutions
- Use a disassembler version matched to the GraalVM that produced the dump.
- If you control the annotation, set the jump-table format to a supported value (OFFSET or KEY2_OFFSET).
- If adding a new format, extend this switch with a decoding branch before shipping dumps that use it.
- Strip or correct the jump-table metadata lines from the hex file to fall back to plain linear disassembly.
Example fix
// before (metadata line in hex file) # jump_table: format=UNKNOWN fmt=... // after # jump_table: format=OFFSET ...
Defensive patterns
Strategy: validation
Validate before calling
if (jumpTable.entryFormat != EntryFormat.OFFSET && jumpTable.entryFormat != EntryFormat.KEY2_OFFSET) {
// skip jump-table rendering, fall back to linear disassembly of the region
} Try / catch
try { renderJumpTable(jt); } catch (IllegalArgumentException e) { /* unknown format: disassemble region linearly instead */ } Prevention
- Match disassembler version to the dump producer.
- When authoring jump-table metadata by hand, use only documented format tokens.
- Extend the switch whenever a new EntryFormat constant is introduced upstream.
When it happens
Trigger: Disassembling a HexCodeFile that carries a jump-table comment/metadata block declaring an entry format constant added in a newer (or removed) GraalVM version, while jumpTable.entryFormat parses to something outside the two handled cases. Also triggered by hand-authored jump-table annotations with a wrong format token.
Common situations: Disassembling dumps produced by a newer GraalVM that introduced a new entry format (e.g. 8-byte offsets) with an older disassembler library, or vice versa after a format constant was renamed.
Related errors
- Unsupported replay file version
- Malformed HexCodeFile in
- Unable to decode some instructions in
- Malformed HexCodeFile in
- Unsupported ISA:
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/fe3371c8123c375a.
Report an issue: GitHub.