Closed pedro-javierf closed 3 years ago
Unfortunately, the stack traces provided do not show the cause or real details of the exception.
The real stack trace is here:
Cannot invoke "ghidra.program.model.address.Address.getAddressSpace()" because "this.address" is null
java.lang.NullPointerException: Cannot invoke "ghidra.program.model.address.Address.getAddressSpace()" because "this.address" is null
at ghidra.program.model.pcode.Varnode.<init>(Varnode.java:52)
at ghidra.program.util.VarnodeContext.getVarnode(VarnodeContext.java:871)
at ghidra.program.util.SymbolicPropogator.applyPcode(SymbolicPropogator.java:837)
at ghidra.program.util.SymbolicPropogator.flowConstants(SymbolicPropogator.java:495)
at ghidra.program.util.SymbolicPropogator.flowConstants(SymbolicPropogator.java:393)
at ghidra.program.util.SymbolicPropogator.flowConstants(SymbolicPropogator.java:191)
at ghidra.app.cmd.function.NewFunctionStackAnalysisCmd.createStackPointerVariables(NewFunctionStackAnalysisCmd.java:340)
at ghidra.app.cmd.function.NewFunctionStackAnalysisCmd.analyzeFunction(NewFunctionStackAnalysisCmd.java:191)
at ghidra.app.cmd.function.NewFunctionStackAnalysisCmd.applyTo(NewFunctionStackAnalysisCmd.java:118)
at ghidra.app.plugin.core.function.StackVariableAnalyzer.added(StackVariableAnalyzer.java:55)
at ghidra.app.plugin.core.analysis.OneShotAnalysisCommand.applyTo(OneShotAnalysisCommand.java:47)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager$AnalysisTaskWrapper.run(AutoAnalysisManager.java:688)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:788)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:667)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:632)
at ghidra.app.plugin.core.analysis.AnalysisBackgroundCommand.applyTo(AnalysisBackgroundCommand.java:58)
at ghidra.framework.plugintool.mgr.BackgroundCommandTask.run(BackgroundCommandTask.java:102)
at ghidra.framework.plugintool.mgr.ToolTaskManager.run(ToolTaskManager.java:315)
at java.base/java.lang.Thread.run(Thread.java:832)
I reviewed a bit of code for things that changed and may have caused this, then worked with @caheckman on these hypotheses and he mocked up a program to test this, and we think we have a solution in the works for this.
Describe the bug Stack analysis on an ARM binary fails with a NullPointerException in the latest Ghidra stable releases (9.2 and 9.2.2).
To Reproduce Steps to reproduce the behavior:
Expected behavior A successful analysis. On the previous Ghidra stable release (9.1.2) the same extension worked correctly.
Screenshots
GUI Error Window does not provide much information
Attachments
Any commercial game seems to be useful to reproduce the steps. Cannot link to them because of copyright, but some nds game examples are: FIFA 11 Soccer, Rhythm Heaven, etc.
Environment (please complete the following information):
Additional context
The same extension worked fine on Ghidra 9.1.2 thus there must be some changes in Ghidra or the FlatAPI that break the analysis.
Full Stack Trace: https://gist.github.com/pedro-javierf/5854479c1c804aa470fea0128cd6e4d6