Decompiler: Unable to initialize the DecompilerInterface: java.lang.RuntimeException: No Register Defined: s8
Closed this issue · 10 comments
I'm getting following exception in decompiler (Ghirda 9.0.4):
2019-07-24 14:20:30 ERROR (DecompileProcess) Unexpected Exception: No Register Defined: s8 java.lang.RuntimeException: No Register Defined: s8
at ghidra.app.decompiler.DecompileCallback.getRegister(DecompileCallback.java:724)
at ghidra.app.decompiler.DecompileProcess.getRegister(DecompileProcess.java:619)
at ghidra.app.decompiler.DecompileProcess.readResponse(DecompileProcess.java:322)
at ghidra.app.decompiler.DecompileProcess.registerProgram(DecompileProcess.java:444)
at ghidra.app.decompiler.DecompInterface.initializeProcess(DecompInterface.java:228)
at ghidra.app.decompiler.DecompInterface.openProgram(DecompInterface.java:314)
at ghidra.app.decompiler.component.Decompiler.getDecompilerInterface(Decompiler.java:79)
at ghidra.app.decompiler.component.Decompiler.decompile(Decompiler.java:48)
at ghidra.app.decompiler.component.DecompilerManager.decompile(DecompilerManager.java:167)
at ghidra.app.decompiler.component.DecompileRunnable.monitoredRun(DecompileRunnable.java:108)
at ghidra.util.task.RunManager$RunnerJob.doExecute(RunManager.java:334)
at ghidra.util.task.RunManager$RunnerJob.run(RunManager.java:309)
at ghidra.util.worker.AbstractWorker$JobCallback.process(AbstractWorker.java:133)
at ghidra.util.worker.AbstractWorker$JobCallback.process(AbstractWorker.java:123)
at generic.concurrent.ConcurrentQ$CallbackCallable.call(ConcurrentQ.java:655)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at generic.concurrent.FutureTaskMonitor.run(FutureTaskMonitor.java:70)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Am I doing something wrong or decompilation is not supported?
From what I know there was no 9.0.3 release. I tried with 9.0.1 (decompiler seems to work) and 9.0.2 (the same error as in 9.0.4).
I think it may be related to issue #14. I've seen it before creating this issue but this exception wasn't mentioned so I supposed it was a different error but maybe it's the same...
I've checked differences between data/languages directory in extension for 9.0.1 and for 9.0.2 and the biggest difference is r5900.sla file:
- different size: 932KB in 9.0.1 vs 3.2MB in 9.0.2
- there is a string "s8" in 9.0.1 and no such string in 9.0.2
Also I noticed there is emotionengine.sla file - is this actually used?
The .sla is the sleigh compiled file.
I've managed to run decompilation in Ghirda 9.0.2 after copying sla file from 9.0.1 extension to 9.0.2. So I guess this file is causing No Register Defined issue
I've managed to run decompilation in Ghirda 9.0.2 after copying sla file from 9.0.1 extension to 9.0.2. So I guess this file is causing No Register Defined issue
I know 9.1 will do this, but try deleting the .sla file and then using it in 9.0.4 and see if ghidra recompiles it.
The releases where compiled using the gradle build script provided by Ghidra, but I have not updated the gradle file since the first release - perhaps they changed something in that...
I tried compiling using Gradle but it didn't generate the .sla file at all:
gradle -PGHIDRA_INSTALL_DIR=/home/rafalh/Ghidra/ghidra_9.0.2/
Then I used the sleigh script manually:
../ghidra_9.0.2/support/sleigh -a data/languages/
It generated 909KB r5900.sla file which had "s8" strings included. From what I saw in support/buildExtension.gradle included in build.gradle file all files from repository are included in the built extension zip (expect for blacklisted). I guess @beardypig must have had an invalid sla file in repo during the build of 9.0.2 and 9.0.4 packages.
Thanks @rafalh, that looks like it was the problem :) There were some old compiles sla
files that were getting picked up. I have removed them from the builds and it seems to work for me, please could you test it works for you?
New packages fixed the problem :) Thank you!