Skip to content

incosistency between return types in disassembly/function signature editor vs decompile view #9420

Description

@orangecms

I am sometimes seeing that the decompile view shows

void foo(void)
{
  /* ... */
}

and yet, in another function calling it, I would get something like

  iVar1 = foo();
  iVar2 = *(int *)(iVar1 + 0x800); // looks weird; iVar1 here was really a function argument
  • leaving me puzzled; why the assignment from void?

I then noticed that in the disassembly view in the function signature editor, I would see the return type undefined, and would need to adjust it. Having done so, the calling function correctly reads

  r16_to_stack();
  iVar1 = *(int *)(param_1 + 0x800);

I checked existing issues from the last ~2 years, but couldn't see a similar bug report.
I am on 52aed0a plus the changes in #3006 and I'm analyzing an ARCompact binary that I cannot share for legal reasons.
See https://github.com/orangecms/ghidra/releases/tag/Ghidra_12.1.2-2_ARCompact_build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions