Skip to content

Can't override call type for tail call recursion or functions used in a return statement #3655

@clubby789

Description

@clubby789

Version and Platform (required):

  • Binary Ninja Version: 3.2.3814-dev (if version is stable, please also test the latest development build via the "Update Channel" option)
  • OS: Manjaro Linux
  • OS Version: 6.0.7-2
  • CPU Architecture: x64

Bug Description:
When a function called is part of a HLIL return statement (e.g. return func()) the option to override the call type is not available.

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Compile this program
void func() { func(); }
int main() {func(); }
  1. Open it in Binary Ninja
  2. Right click on func() in main (Override call type is available)
  3. Right click on return func() in func (It is not available)
    Retyping func to return void makes the option available again, as it is no longer part of a return statement (HLIL_RET with an operand of HLIL_CALL, to HLIL_CALL).

I have also seen this behaviour with __tailcall calls.

Expected Behavior:
The option to overrde call types should be available on all function calls.

Metadata

Metadata

Assignees

Labels

Component: CoreIssue needs changes to the core

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions