{"record":{"id":"3064165b6dc7471e","repo":"oracle/graal","slug":"block-that-is-reached-by-a-fall-through-end-of-cod","errorCode":null,"errorMessage":"Block that is reached by a fall through end of code is reached.","messagePattern":"Block that is reached by a fall through end of code is reached\\.","errorType":"exception","errorClass":"PermanentBailoutException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/java/BytecodeParser.java","lineNumber":3681,"sourceCode":"\n    private ValueNode synchronizedObject(FrameStateBuilder state, ResolvedJavaMethod target) {\n        if (target.isStatic()) {\n            return appendConstant(getConstantReflection().asJavaClass(target.getDeclaringClass()));\n        } else {\n            return state.loadLocal(0, JavaKind.Object);\n        }\n    }\n\n    @SuppressWarnings(\"try\")\n    protected void processBlock(BciBlock block) {\n        // Ignore blocks that have no predecessors by the time their bytecodes are parsed\n        FixedWithNextNode firstInstruction = getFirstInstruction(block);\n        if (firstInstruction == null) {\n            debug.log(\"Ignoring block %s\", block);\n            return;\n        }\n        if (block.isOutOfBounds()) {\n            throw new PermanentBailoutException(\"Block that is reached by a fall through end of code is reached.\");\n        }\n        try (Indent indent = debug.logAndIndent(\"Parsing block %s  firstInstruction: %s  loopHeader: %b\", block, firstInstruction, block.isLoopHeader())) {\n\n            lastInstr = firstInstruction;\n            frameState = getEntryState(block);\n            currentBlock = block;\n\n            if (firstInstruction instanceof AbstractMergeNode) {\n                setMergeStateAfter(block, firstInstruction);\n            }\n\n            if (block == blockMap.getUnwindBlock()) {\n                handleUnwindBlock();\n            } else if (block instanceof ExceptionDispatchBlock) {\n                createExceptionDispatch((ExceptionDispatchBlock) block);\n            } else {\n                handleBytecodeBlock(block);\n            }","sourceCodeStart":3663,"sourceCodeEnd":3699,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/java/BytecodeParser.java#L3663-L3699","documentation":"Thrown by BytecodeParser.processBlock when the block being parsed is marked isOutOfBounds — a block whose bytecode range lies outside the method's declared code array (reached by falling through the end of the code). The JVM verifier rejects such flow, so Graal permanently bails out instead of building a graph for malformed bytecode.","triggerScenarios":"processBlock(block) with block.isOutOfBounds() true: control flow reaches a block whose start BCI is at/after the end of the bytecode array, i.e. a branch target or fall-through computed beyond code_length.","commonSituations":"Malformed or corrupted class files; bytecode rewritten late by instrumentation agents (ASM/AspectJ/coverage tools) that adjust jump offsets incorrectly; hand-generated bytecode with wrong branch destinations; class files truncated by a broken download or class-data-sharing issue.","solutions":["Regenerate or fix the class file so no branch targets beyond code_length (verify with the JVM: `java -Xverify:all` or a bytecode verifier tool).","Update/reconfigure the bytecode instrumentation agent suspected of rewriting the method.","Rebuild/re-download the artifact to rule out corrupted class data."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// verify the class before JIT-heavy runs\n// javap -c Myкласс.class  -> ensure no branch target >= code_length\n// or run: java -Xverify:all ...","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run with strict verification (`-Xverify:all`) in CI for generated classes.","Test bytecode-transforming agents against Graal-enabled JVMs before shipping."],"tags":["graalvm","bytecode-parsing","malformed-bytecode","bailout"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}