NationalSecurityAgency/ghidra · critical · IOException

Platform table is corrupt. Invalid compiler spec ${compilerS

Error message

Platform table is corrupt. Invalid compiler spec ${compilerSpec}

What it means

After resolving the language in fresh(), the code fetches the compiler spec by stored ID via getLanguage().getCompilerSpecByID(cSpecID); if null it throws IOException("Platform table is corrupt. Invalid compiler spec"). The stored cspec ID does not exist in the resolved language's compiler-spec set.

Source

Thrown at Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/guest/DBTraceGuestPlatform.java:192

		this.langKey = (int) (languageEntry == null ? -1 : languageEntry.getKey());
		this.cSpecID = compilerSpec.getCompilerSpecID();
		update(LANGKEY_COLUMN, CSPECID_COLUMN);
		this.compilerSpec = compilerSpec;
	}

	@Override
	protected void fresh(boolean created) throws IOException {
		super.fresh(created);
		if (created) {
			return;
		}
		this.languageEntry = manager.getLanguageByKey(langKey);
		if (languageEntry == null && langKey != -1) {
			throw new IOException("Platform table is corrupt. Missing language " + langKey);
		}
		compilerSpec = getLanguage().getCompilerSpecByID(cSpecID);
		if (compilerSpec == null) {
			throw new IOException(
				"Platform table is corrupt. Invalid compiler spec " + compilerSpec);
		}
	}

	protected void loadDataTypeManager(OpenMode openMode, TaskMonitor monitor)
			throws CancelledException, VersionException, IOException {
		this.dataTypeManager = new DBTraceDataTypeManager(manager.dbh, openMode, manager.lock,
			monitor, manager.trace, this);
	}

	@Override
	public Trace getTrace() {
		return manager.trace;
	}

	@Override
	public int getIntKey() {
		return (int) key;

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Use the language version that still defines that compiler spec.
  2. Re-install the matching processor module version.
  3. Rebuild the trace/platform if the cspec is genuinely unavailable.
Defensive patterns

Strategy: try-catch

Validate before calling

// ensure the compiler spec exists in the resolved language
if (language.getCompilerSpecByID(new CompilerSpecID(cspecId)) == null) {
    // use a language version that still defines this cspec
}

Try / catch

try { trace.open(...); }
catch (IOException e) {
    if (e.getMessage().contains("Invalid compiler spec")) { /* require matching language version */ }
    else throw e;
}

Prevention

When it happens

Trigger: Opening a trace with a language version whose compiler spec was removed or renamed, leaving cSpecID orphaned; corrupt row holding an invalid spec ID.

Common situations: Language pack version drift; cross-version trace sharing where cspec identifiers changed; partially upgraded DB.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/47fd6a9f6470a8c5. Report an issue: GitHub.