You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When invoking decompileFunction(from class DecompInterface) many times with a fixed timeout, there is a chance that decompileFunction will encounter null pointer dereference.
To Reproduce
Steps to reproduce the behavior:
Given a binary, write the following code to decompile each function in binary with a fixed timeout (60 seconds). In order to reproduce this vulnerability, a timeout is required when decompiling some functions.
This may trigger an unexpected crash, see the following error text and screenshot.
ERROR REPORT SCRIPT ERROR: (HeadlessAnalyzer) java.lang.NullPointerException: Cannot invoke "ghidra.program.model.pcode.Decoder.clear()" because "decoder" is null
at ghidra.app.decompiler.DecompInterface.decompileFunction(DecompInterface.java:811)
at xxx.xxx.getHighFunc
The following code shows the crash context, see source code
I think the decoder variable could remain uninitialized if an exception happens before decoder is set to activeSet.mainResponse.
The reason was that sometimes Ghidra headless doesn't recognize some functions automatically as Ghidra originally did. So you have to create the corresponding function first and the problem will be solved.
Describe the bug
When invoking decompileFunction(from class DecompInterface) many times with a fixed timeout, there is a chance that
decompileFunction
will encounter null pointer dereference.To Reproduce
Steps to reproduce the behavior:
Given a binary, write the following code to decompile each function in binary with a fixed timeout (60 seconds). In order to reproduce this vulnerability, a timeout is required when decompiling some functions.
This may trigger an unexpected crash, see the following error text and screenshot.
The following code shows the crash context, see source code
I think the
decoder
variable could remain uninitialized if an exception happens beforedecoder
is set to activeSet.mainResponse.Expected behavior
There may not be potential null pointer dereference.
Screenshots
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: