Incorrect stack variables detection and usage on x86 #7347
Open
Description
Describe the bug
The following program breaks Ghidra's detection and use of local (stack) variables, if compiled with Visual C++ 6:
Once compiled with Visual C++ 6, analyzed and decompiled by Ghidra, the stack variables are missing:
Even though the disassembly listing shows the population of the local variables:
The same code compiled with Visual Studio 2005 is being recognized correctly:
To Reproduce
- Compile Main.cpp from the attached archive Example.zip with Visual C++ 6 and analyze it with Ghidra. Or analyze VC6.exe from the same archive right away.
- Verify that local variables are not detected and a bunch of assembly instructions are skipped by Ghidra during decompilation.
Expected behavior
The local variables have to be detected and populated in VC6.exe in the same manner as in 2005.exe (compiled with Visual Studio 2005)
Attachments
Example.zip
Environment (please complete the following information):
- OS: Microsoft Windows [Version 10.0.19045.5247]
- Java Version: 23.0.1
- Ghidra Version: 11.2 Public
- Ghidra Origin: Official GitHub distribution
Metadata
Assignees
Labels
No labels