NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
51.22k stars 5.83k forks source link

Sparc 32 defaulting to returning undefined8 for void #6990

Open mumbel opened 2 weeks ago

mumbel commented 2 weeks ago

Describe the bug Upgraded an image. Noticed uncommitted void return functions want to now return undefined8.

Using unknown logic for the low 32 or really high, but wants to use param_2 as the high 32-bits. Inserting at least a param_1 and param_2 into the prototype even when it's zero arguments.

Previous ghidra versions were also broken though sometimes, converting void into undefined4, returning param_1 (and adding param_1 as an argument even when not present)

Environment (please complete the following information):

mumbel commented 2 weeks ago

No, nvmd. It's def breaking lots of functions, not just void return. It doesn't pick up the return 4-byte value and uses the previous o0 value

emteere commented 2 weeks ago

Are these assigned return and param types, or is the decompiler recovering the types on the fly? I'm assuming you mean the decompiler is computing them on the fly and you haven't committed the param/return from the decompiler or assigned the types manually.

64 or 32 bit sparc?

Do you have any example functions you could share? Either bytes or copy/paste of listing?