Vector35 / Vector35/binaryninja-api

"Override Call Type" does not respect custom calling conventions

Open
#4,407 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: UI Effort: Trivial Impact: Medium
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

When using "Override Call Type" on a function which has a custom calling convention set, the calling convention is not retained/applied.

For example, upon clicking "Override Call Type", the following type string is produced in the dialog box:

image

Then, I added a third argument:

image

After accepting, the analysis is visibly wrong in the IL (not pictured, but take my word that it's not using the correct calling convention), and upon opening the dialog again, the custom calling convention is gone:

image

Observed on Binary Ninja 3.5.4322-dev.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue through the Override Call Type dialog with a function using a custom calling convention. Compare the generated type string, the analyzed IL, and the reopened dialog before and after adding an argument. Done means the custom calling convention remains applied and the IL reflects it correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.