Skip to content

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

@WeiN76LQh

Description

@WeiN76LQh

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.

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