{"record":{"id":"8b50db3f57c1b72c","repo":"oracle/graal","slug":"unsupported-os","errorCode":null,"errorMessage":"Unsupported OS: ","messagePattern":"Unsupported OS: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/disassembler/HotSpotDisassembler.java","lineNumber":73,"sourceCode":"\n    private final Architecture architecture;\n    final String mach;\n    final String options;\n    final Pattern branchInstruction;\n\n    public HotSpotDisassembler(Architecture arch) {\n        /*\n         * hsdis contains all assemblers but the mechanism for selecting alternative disassemblers\n         * using \"mach=\" is currently broken. So throw an exception when trying to disassemble a\n         * different architecture.\n         */\n        if (!currentArchitecture.equals(arch)) {\n            throw new IllegalArgumentException(\"Unsupported ISA: \" + arch);\n        }\n        String osName = System.getProperty(\"os.name\", \"\");\n        if (osName.startsWith(\"Windows\")) {\n            // The current implementation relies on fmemopen which is not available on Windows\n            throw new IllegalArgumentException(\"Unsupported OS: \" + osName);\n        }\n        this.architecture = arch;\n        if (arch.equals(Architecture.AMD64)) {\n            // Use Intel syntax\n            mach = \"i386:x86-64\";\n            options = \"intel\";\n            branchInstruction = Pattern.compile(\n                            \"^(jmp|ret|je|jne|ja|jae|jb|jbe|jc|jcxz|jecxz|jg|jge|jl|jle|jna|jnae|jnb|jnbe|jnc|jne|jng|jnge|jnl|jnle|jno|jnp|jns|jnz|jo|jp|jpe|jpo|js|jz)\\\\b\");\n        } else if (arch.equals(Architecture.AArch64)) {\n            mach = \"aarch64\";\n            options = \"\";\n            /*\n             * Don't treat bl as a branch since it's a call. Uninitialized call sites look like self\n             * calls.\n             */\n            branchInstruction = Pattern.compile(\"^b[. \\t]\");\n        } else {\n            throw new IllegalArgumentException(\"Unsupported ISA: \" + arch);","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/disassembler/HotSpotDisassembler.java#L55-L91","documentation":"The HotSpotDisassembler constructor throws this when os.name starts with \"Windows\". The implementation funnels hsdis output through fmemopen (a POSIX function) via the Panama/FFM binding, which does not exist on Windows, so the library refuses to construct rather than fail at native-link time. It is a platform limitation, not a configuration problem.","triggerScenarios":"Constructing HotSpotDisassembler (including indirectly through DisassemblerTool or MachCode on an hs_err file) on any Windows host, regardless of ISA. The check runs after the architecture check, so a Windows/AMD64 machine passes the ISA gate and then hits this one.","commonSituations":"Developers running GraalVM disassembler tooling or compiler tests natively on Windows; CI pipelines that build on windows-latest runners; WSL avoids it because os.name reports Linux.","solutions":["Run the disassembler inside WSL, a Linux container, or on a Linux/macOS machine.","Skip disassembly-dependent tests/tooling on Windows via an os.name guard or JUnit assumption.","If Windows support is required, replace the fmemopen dependency with a Windows-compatible memory-stream approach and contribute it upstream.","Detect early: check System.getProperty(\"os.name\") before touching the class so users see a clear message."],"exampleFix":"// before\nAssume.assumeTrue(true); // test then fails with Unsupported OS on Windows\n// after\nAssume.assumeFalse(System.getProperty(\"os.name\", \"\").startsWith(\"Windows\"));","handlingStrategy":"validation","validationCode":"if (System.getProperty(\"os.name\", \"\").startsWith(\"Windows\")) {\n    throw new UnsupportedOperationException(\"hsdis disassembly requires fmemopen; use WSL or Linux\"); }","typeGuard":null,"tryCatchPattern":"try { new HotSpotDisassembler(arch); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Unsupported OS\")) { /* route to WSL/container or disable feature */ } else throw e; }","preventionTips":["Gate disassembler features on os.name != Windows.","Use WSL or Linux CI runners for disassembly-dependent tests.","The limitation is fmemopen-based — do not expect a config flag to bypass it."],"tags":["graalvm","disassembler","windows","platform-support"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}