Vector35 / Vector35/binaryninja-api
[Apple] Objective-C runtime functions should use lower confidence for their `id` parameters
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
Version and Platform (required):
- Binary Ninja Version: 5.2.8236-dev Ultimate, d8af0ff0
- OS: macos
- OS Version: 26.0
- CPU Architecture: arm64
Bug Description:
To help mitigate the impact of https://github.com/Vector35/binaryninja-api/issues/7367 on Objective-C code we should update the relevant type libraries to lower the confidence of parameters typed as id on Objective-C runtime functions such as objc_retain. They currently have full confidence.
The types are correct, but the fact that subtyping isn't considered during type resolution means that the less specific id type has equal weight as more specific function return types with the same confidence.
https://github.com/Vector35/binaryninja-api/issues/7369 tracks having type resolution consider subtyping which would let us remove this workaround.
Steps To Reproduce:
See https://github.com/Vector35/binaryninja-api/issues/7367.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction in linked issue 7367 and inspect the relevant Objective-C runtime type-library entries, including objc_retain. Lower confidence only for parameters typed as id, then verify that the reproduction no longer gives those parameters equal weight to more-specific return types; issue 7369 describes the longer-term resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, objective-c
- Domain
- reverse-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100