Using the UI to change a function's type removes the assigned custom calling convention

Open
#8,052 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp

Research direction

Reproduce the issue in the Binary Ninja UI using the _localeconv_l function and the apple-arm64-objc-fast-arc-4 calling convention described in the steps. Compare the function type before and after confirming the Change Type dialog; done means the custom calling convention remains present after confirmation.

Written by the indexing model from the issue text.

Description

State: Awaiting Triage

Version and Platform (required):

  • Binary Ninja Version: 5.3.9393-dev Ultimate (ae6ee6f5)
  • Edition: Ultimate
  • OS: macOS
  • OS Version: 26.3
  • CPU Architecture: M1

Bug Description:
If a function has a custom calling convention and I right-click and select "Change Type" (or press Y) and then press enter once the dialog box comes up then the custom calling convention is stripped from the function.

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

  1. Open a copy of DYLD Shared Cache
  2. Wait for initial analysis to finish
  3. Go to _localeconv_l
  4. Edit its function properties and set its calling convention to apple-arm64-objc-fast-arc-4
  5. The function type should change to void* __convention("apple-arm64-objc-fast-arc-4") _localeconv_l(void* arg1 @ x0)
  6. Right-click the function and select "Change Type"
  7. Notice that the function type is correct in the dialog
  8. Press enter to confirm the type
  9. Notice how its type goes back to void* _localeconv_l(void* arg1)

Expected Behavior:
Custom calling conventions should not be stripped when changing the type via the UI.

Binary:
Tested against DYLD Shared Cache for iOS 26.2 for an iPhone 17 Pro Max.

Additional Information:
Didn't test whether this happens when using the Python API to make the changes.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

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.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.