NationalSecurityAgency/ghidra · error · PcodeExecutionException
Unrecognized address space in {}
Error message
Unrecognized address space in {} What it means
Thrown (unchecked PcodeExecutionException) by AbstractVarnodeEvaluator when a varnode's address belongs to none of the four recognized address spaces — register, stack, memory, or unique. The evaluator dispatches on address-space type (isRegisterAddress/isStackAddress/isMemoryAddress/isUniqueAddress); anything else (e.g. join, hash, external, fsk constants, or a custom space) falls through to this catch-all.
Source
Thrown at Ghidra/Debug/ProposedUtils/src/main/java/ghidra/pcode/eval/AbstractVarnodeEvaluator.java:135
protected T evaluateLeaf(Program program, Varnode vn) {
Address address = vn.getAddress();
if (address.isConstantAddress()) {
return evaluateConstant(vn.getOffset(), vn.getSize());
}
else if (address.isRegisterAddress()) {
return evaluateRegister(address, vn.getSize());
}
else if (address.isStackAddress()) {
return evaluateStack(address.getOffset(), vn.getSize());
}
else if (address.isMemoryAddress()) {
return evaluateMemory(translateMemory(program, address), vn.getSize());
}
else if (address.isUniqueAddress()) {
return evaluateUnique(vn.getOffset(), vn.getSize());
}
else {
throw new PcodeExecutionException("Unrecognized address space in " + vn);
}
}
/**
* Evaluate a varnode, which could be either a leaf or a branch
*
* <p>
* This method is invoked by {@link #evaluateVarnode(Program, Varnode, Map)} when the value has
* not already been computed. Only that method should invoke this one directly.
*
* @param program the program defining the static context
* @param vn the varnode
* @param already a cache of already-evaluated varnodes and their values
* @return the value
*/
protected T doEvaluateVarnode(Program program, Varnode vn, Map<Varnode, T> already) {
if (isLeaf(vn)) {
return evaluateLeaf(program, vn);View on GitHub (pinned to d5f144c24d)
Solutions
- Subclass AbstractVarnodeEvaluator and override the leaf-evaluation entry to handle the extra address space (e.g. add an else-if for address.isJoinAddress() and decompose it).
- Filter the varnodes/ops passed to the evaluator so unsupported address spaces are never evaluated.
- Upgrade/patch the evaluator's dispatch to recognise the space your target architecture uses.
- Report the offending varnode (printed in the message) to confirm which space type is involved before deciding.
Example fix
// before: default dispatcher throws on JOIN space
protected T evaluateLeaf(Program p, Varnode vn, Map<Varnode,T> cache) {
return super.evaluateLeaf(p, vn, cache); // throws PcodeExecutionException
}
// after: handle the extra space before delegating
protected T evaluateLeaf(Program p, Varnode vn, Map<Varnode,T> cache) {
Address a = vn.getAddress();
if (a.getAddressSpace().getType() == AddressSpace.TYPE_JOIN) {
return evaluateJoin(vn);
}
return super.evaluateLeaf(p, vn, cache);
} Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check the address space before evaluation
Address a = vn.getAddress();
if (!a.isRegisterAddress() && !a.isStackAddress() && !a.isMemoryAddress() && !a.isUniqueAddress()) {
// unsupported space; handle or skip instead of evaluating
} Try / catch
try {
T val = evaluator.evaluateVarnode(program, vn, cache);
} catch (PcodeExecutionException e) {
if (e.getMessage().startsWith("Unrecognized address space")) { /* handle/skip */ }
else throw e;
} Prevention
- Subclass the evaluator and extend the space dispatcher for your architecture's spaces (JOIN, HASH, etc.).
- Filter varnodes by address-space type before evaluation.
- Print the offending varnode to identify the space when debugging.
When it happens
Trigger: Evaluating p-code/varnodes that reference a special address space the evaluator doesn't model — for example a JOIN space (multi-register combined operand), a HASH space, EXTERNAL space, or a processor-specific custom space. Triggered when the evaluator is driven over p-code containing such a varnode.
Common situations: Emulating/symbolically-executing p-code that includes combined-register operands (JOIN) common in some architectures; analyzing binaries whose decompiler emits varnodes in non-standard spaces; using a subclass that overrode some evaluate* methods but not the space dispatcher.
Related errors
- No defining p-code op for {}
- Cannot evaluate unique $U%x:%d
- {} is not a constant
- Encountered an unimplemented instruction at {}
- Unsupported p-code op at {}: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/528640272dd20b04.
Report an issue: GitHub.