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 setting the output variable type, in some cases the decompiler changes the input type to match.
I've noticed this lately (at least 11.0.2) on SPARC and PPC. Not sure under what circumstances it happens, but seems often enough with functions like a typed malloc taking a size or "get pointer by index" like functions. Does not seem to matter how complex the function is, I've seen it in 10 line helper functions with barely any stack usage and 500 line functions with massive stack size
it's not automatic but once you type pVar (ctrl+l / enter) or commit it, then the decompiler removes the uVar.
Environment (please complete the following information):
Ghidra Version: 11.2.1
Ghidra Release: PUBLIC
Ghidra Build Date: 2024-Nov-05 1643 EST
Ghidra Revision: a34349b
Ghidra Development Mode: false
OS Name: Linux
OS Arch: amd64
OS Version: 6.8.0-51-generic
OS Pretty Name: Ubuntu 24.04.1 LTS
Java Vendor: Ubuntu
Java Version: 21.0.5
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
You can right click one of the instances of pVar and select "Split out as new variable" with a new variable name. You can then retype that to match whatever type, and it should fix it for you.
I would recommend you undo the changes to have the first pVar to be an integer first, because once Ghidra devices to do things like "(bla *)someLiteral" it has a hard time to shake it off. Not always, but it happens enough.
Describe the bug
When setting the output variable type, in some cases the decompiler changes the input type to match.
I've noticed this lately (at least 11.0.2) on SPARC and PPC. Not sure under what circumstances it happens, but seems often enough with functions like a typed malloc taking a size or "get pointer by index" like functions. Does not seem to matter how complex the function is, I've seen it in 10 line helper functions with barely any stack usage and 500 line functions with massive stack size
would turn into
it's not automatic but once you type pVar (ctrl+l / enter) or commit it, then the decompiler removes the uVar.
Environment (please complete the following information):
Ghidra Version: 11.2.1
Ghidra Release: PUBLIC
Ghidra Build Date: 2024-Nov-05 1643 EST
Ghidra Revision: a34349b
Ghidra Development Mode: false
OS Name: Linux
OS Arch: amd64
OS Version: 6.8.0-51-generic
OS Pretty Name: Ubuntu 24.04.1 LTS
Java Vendor: Ubuntu
Java Version: 21.0.5
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: