Vector35 / Vector35/binaryninja-api

setting user calling convention clears clobber list

Open
#4,856 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Version and Platform (required):

  • Binary Ninja Version: 3.6.5416-test (f3a9bf73)
  • OS: macOS
  • OS Version: 14.3 (23D5033f)
  • CPU Architecture: Apple silicon

Bug Description:
When setting a function's calling convention, the clobber list is set to empty. I would expect it to be set to the calling convention's caller_saved_regs, at least if it has never been set before.

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

  1. Set a function's calling convention to something else that has a legitimate set of caller_saved_regs.

Expected Behavior:
The function's clobbers should match, or at the very least not be cleared.

Screenshots:
image

Additional Information:
I am not an expert on working with calling conventions, so if you have some sample code to point me to I would be happy to try that instead.

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

No source file or test is named. Start by reproducing the issue while changing a function's calling convention, then trace the API path that updates the function's clobber list and compare it with the convention's caller_saved_regs. Done means changing the convention no longer unexpectedly clears clobbers and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.