{"record":{"id":"fe3371c8123c375a","repo":"oracle/graal","slug":"unknown-jump-table-entry-format","errorCode":null,"errorMessage":"Unknown jump table entry format: ","messagePattern":"Unknown jump table entry format: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/disassembler/HexCodeFileDis.java","lineNumber":163,"sourceCode":"                EntryFormat entryFormat = jumpTable.entryFormat;\n                int entrySize = entryFormat.size;\n                Instruction lastInsn = insns.get(insns.size() - 1);\n                long entries = Math.abs(jumpTable.high - (long) jumpTable.low);\n                for (int i = 0; i <= entries; i++) {\n                    int entryOffset = jumpTable.getPosition() + i * entrySize;\n                    Integer secondaryKey;\n                    int targetOffsetRelativeToJumpTable;\n                    switch (jumpTable.entryFormat) {\n                        case OFFSET:\n                            secondaryKey = null;\n                            targetOffsetRelativeToJumpTable = readInt(dis.isLittleEndian(), hcf.code, entryOffset);\n                            break;\n                        case KEY2_OFFSET:\n                            secondaryKey = readInt(dis.isLittleEndian(), hcf.code, entryOffset);\n                            targetOffsetRelativeToJumpTable = readInt(dis.isLittleEndian(), hcf.code, entryOffset + 4);\n                            break;\n                        default:\n                            throw new IllegalArgumentException(\"Unknown jump table entry format: \" + jumpTable.entryFormat);\n                    }\n                    int primaryKey = jumpTable.low + i;\n                    long target = hcf.startAddress + jumpTableOffset + targetOffsetRelativeToJumpTable;\n                    lastInsn.jumpTable.add(new JumpTableEntry(entryOffset, hcf.startAddress + entryOffset, primaryKey, secondaryKey, target));\n\n                }\n                long newStartOffset = jumpTableOffset + entrySize * (jumpTable.high - (long) jumpTable.low + 1);\n                startOffset = (int) newStartOffset;\n                assert startOffset == newStartOffset;\n            }\n            if (startOffset < hcf.code.length) {\n                for (Instruction i : disassembleAtOffset(hcf, dis, startOffset, hcf.code.length)) {\n                    instructionMap.put(i.getOffset(), i);\n                }\n            }\n        }\n\n        Width labelWidth = new Width(1);","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/disassembler/HexCodeFileDis.java#L145-L181","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (metadata line in hex file)\n# jump_table: format=UNKNOWN fmt=...\n// after\n# jump_table: format=OFFSET ...","handlingStrategy":"validation","validationCode":"if (jumpTable.entryFormat != EntryFormat.OFFSET && jumpTable.entryFormat != EntryFormat.KEY2_OFFSET) {\n    // skip jump-table rendering, fall back to linear disassembly of the region\n}","typeGuard":null,"tryCatchPattern":"try { renderJumpTable(jt); } catch (IllegalArgumentException e) { /* unknown format: disassemble region linearly instead */ }","preventionTips":["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."],"tags":["graalvm","disassembler","jump-table","version-mismatch"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}