NationalSecurityAgency/ghidra · warning · InvalidDataException
Invalid MinGW relocation list location: {}
Error message
Invalid MinGW relocation list location: {} What it means
Thrown as InvalidDataException by MinGWPseudoRelocList.getDataBlock when the address passed in has no memory block, or its block is not initialized. The pseudo-relocation list must live in initialized memory; an address outside memory or in an uninitialized block makes the data unreadable and the analysis invalid.
Source
Thrown at Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/MingwRelocationAnalyzer.java:146
this.program = program;
if (!findLabeledPseudoRelocList()) {
if (program.getDefaultPointerSize() == 8) {
findUnlabeledPseudoRelocList64Bit(monitor);
}
else {
findUnlabeledPseudoRelocList32Bit(monitor);
}
}
if (getDataBlock(pdwListStartAddr) != getDataBlock(pdwListEndAddr)) {
throw new InvalidDataException("Mismatched MinGW relocation list start/end: " +
pdwListStartAddr + " / " + pdwListEndAddr);
}
}
private MemoryBlock getDataBlock(Address addr) throws InvalidDataException {
MemoryBlock block = program.getMemory().getBlock(addr);
if (block == null || !block.isInitialized()) {
throw new InvalidDataException("Invalid MinGW relocation list location: " + addr);
}
return block;
}
boolean listLabelsFound() {
return listLabelsFound;
}
private void findUnlabeledPseudoRelocList64Bit(TaskMonitor monitor)
throws InvalidDataException, CancelledException {
findUnlabeledPseudoRelocList(monitor);
}
private void findUnlabeledPseudoRelocList32Bit(TaskMonitor monitor)
throws InvalidDataException, CancelledException {
View on GitHub (pinned to d5f144c24d)
Solutions
- Confirm the program was fully imported with all sections loaded into initialized memory.
- Check that the resolved address is within an initialized block before constructing MinGWPseudoRelocList.
- Disable the analyzer for binaries known to lack a valid pseudo-reloc list.
- Catch InvalidDataException and skip pseudo-reloc processing for that binary.
Example fix
// before
MemoryBlock b = getDataBlock(addr); // throws if addr not in initialized memory
// after — validate block presence first
MemoryBlock b = program.getMemory().getBlock(addr);
if (b == null || !b.isInitialized()) {
throw new InvalidDataException("Invalid MinGW relocation list location: " + addr);
} Defensive patterns
Strategy: validation
Validate before calling
MemoryBlock b = program.getMemory().getBlock(addr);
if (b == null || !b.isInitialized()) {
// address not usable; skip pseudo-reloc construction
} Type guard
boolean inInitBlock = program.getMemory().getBlock(addr) != null && program.getMemory().getBlock(addr).isInitialized();
Try / catch
try {
new MinGWPseudoRelocList(program, monitor);
} catch (InvalidDataException e) {
log.appendMsg("MinGW pseudo-reloc list unusable: " + e.getMessage());
} Prevention
- Ensure full PE import with all sections loaded into initialized memory.
- Validate block presence before constructing the list.
- Disable the analyzer when the address space is incomplete.
When it happens
Trigger: getMemory().getBlock(addr) returns null (address outside any block), or block.isInitialized() is false (e.g. address in a .bss-like uninitialized block), for either the list start or end address.
Common situations: The pseudo-reloc pointer resolves to an external/import address rather than a real list address; a malformed PE with bad relocation metadata; the binary's memory layout changed between import versions; analyzing a partially-loaded program where the relevant block was not loaded.
Related errors
- Mismatched MinGW relocation list start/end: {} / {}
- MinGW pseudo-relocation list not found
- Missing MinGW __RUNTIME_PSEUDO_RELOC_LIST_END__ symbol
- Failed to allocate block: " + blockName
- Failed to read memory
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/59b6d83b50a6504f.
Report an issue: GitHub.