oracle/graal · error · IllegalArgumentException
Unsupported ISA:
Error message
Unsupported ISA:
What it means
PanamaDisassemblerVisitor.getHsDisLookup derives the hsdis library name from os.arch and throws for anything outside x86_64/amd64 (hsdis-amd64) and aarch64/arm64 (hsdis-aarch64). This runs when the visitor class first needs the native symbol lookup, so unsupported platforms fail at native-library resolution time with a clear message naming the os.arch value.
Source
Thrown at compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/disassembler/PanamaDisassemblerVisitor.java:57
/**
* A Panama-based visitor for hsdis decode_instructions_virtual using the stable Panama API (JDK
* 25).
*/
@SuppressWarnings("restricted")
public class PanamaDisassemblerVisitor extends HotSpotDisassembler.Visitor {
/**
* The path to the copy of the hsdis library for this platform. If this is unset then the
* library is looked up from the platform library path.
*/
private static final String DISASSEMBLER_PROPERTY = "test.jdk.graal.compiler.disassembler.path";
private static SymbolLookup getHsDisLookup() {
String arch = System.getProperty("os.arch");
String hsdisLib = switch (arch) {
case "x86_64", "amd64" -> "hsdis-amd64";
case "aarch64", "arm64" -> "hsdis-aarch64";
default -> throw new IllegalArgumentException("Unsupported ISA: " + arch);
};
// hsdis uses a non-standard naming so drop the leading lib part of the name
String libraryName = System.mapLibraryName(hsdisLib);
if (libraryName.startsWith("lib")) {
libraryName = libraryName.substring(3);
}
String libpath = System.getProperty(DISASSEMBLER_PROPERTY);
if (libpath != null) {
// Load from an explicitly specified path
Path lib = Path.of(libpath);
if (Files.isDirectory(lib)) {
lib = lib.resolve(libraryName);
}
return SymbolLookup.libraryLookup(lib, Arena.global());
} else {
/*
* Try to load the normal hsdis library from the library path. This will find hsdis thatView on GitHub (pinned to a66e9ccd1d)
Solutions
- Run on AMD64 or AArch64 — the only ISAs with shipped hsdis libraries.
- If arch detection is wrong (e.g. QEMU/32-bit corner cases), force os.arch or use an explicit library path only after confirming the binary matches the real CPU.
- Skip disassembler tests on unsupported platforms with an os.arch-based assumption.
- Contribute an hsdis port if you need a new ISA — the library-name map must be extended alongside it.
Example fix
// before: test unconditionally uses disassembler
// after
Assume.assumeTrue(Arrays.asList("amd64","x86_64","aarch64","arm64").contains(System.getProperty("os.arch"))); Defensive patterns
Strategy: validation
Validate before calling
static final Set<String> HSDIS_ARCHES = Set.of("amd64", "x86_64", "aarch64", "arm64");
static boolean hsdisAvailable() { return HSDIS_ARCHES.contains(System.getProperty("os.arch")); } Prevention
- Skip disassembler tests via os.arch assumptions on non-x86/arm hosts.
- Library names are exactly hsdis-amd64 / hsdis-aarch64 — provide the matching one.
- Verify the os.arch value under QEMU/cross environments before relying on detection.
When it happens
Trigger: Any disassembly attempt on a JVM reporting os.arch of riscv64, ppc64le, s390x, arm, etc. The switch in getHsDisLookup has no matching case and the default arm throws before System.mapLibraryName is consulted.
Common situations: Running GraalVM disassembler tests on non-x86/arm hardware, or under a JDK whose os.arch normalization differs (e.g. 32-bit 'arm'). Frequently co-occurs with error 386's static initializer failure, but this one fires at library-load time.
Related errors
- Unsupported ISA:
- Failed to initialize the PAPI bridge
- Unsupported OS:
- Could not determine CPU from vm_info in %s:%n%s
- LogFile substitution %s cannot be combined with any other ch
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/dc3e6b420b2cee69.
Report an issue: GitHub.