ghidra
ghidra copied to clipboard
Decompiler exception in x86 code (regression)
Describe the bug Decompiler crashes when attempting to process one particular function. Happened between 10.3 and 10.3.3, still present in 10.4
To Reproduce
-
Create new project
-
Import the attached file (rename it to MAPNAV.DLL), it is a 16-bit NE executable. MAPNAV.DLL
-
Start Ghidra and run autoanalysis with default parameters
-
Navigate to
_MAPNAV_MNEW
function in Exports -
The decompiler window shows:
Exception while decompiling 1008:0041: Decompiler process died
Expected behavior In Ghidra 10.3 (May 10) the function is being decompiled
undefined4 __stdcall16far
_MAPNAV_MNEW(undefined2 param_1,undefined2 param_2,undefined4 param_3,undefined2 param_4,
undefined2 param_5)
{
code **ppcVar1;
int iVar2;
undefined2 uVar3;
undefined2 uVar4;
Attachments MAPNAV.DLL (20 kb)
Environment (please complete the following information):
- OS: macOS 14.1 Sonoma
- Java Version: 21.0.1
- Ghidra Version: 10.3.3 and later
- Ghidra Origin: official GitHub distro
Additional context Add any other context about the problem here.
Not sure why but I cannot download your attachment.
As I mentioned, you have to rename it. Download it as a blob, because I had to add .png extension to it due to limitation of GitHub which whitelists acceptable file names.
E.g. right click, save as, name it "MAPNAV.DLL"
Issue is still present in the master
branch.
Regarding
Navigate to _MAPNAV_NEW function in Exports
there is no such API, did you mean _MAPNAV_MNEW ?
Yes, it was a typo. Shown correctly on the 10.3 decompiler output, though
the freshly baked version 11.0 still has this bug: