[Apple] Objective-C runtime functions should use lower confidence for their `id` parameters

Offen
#7,370 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
cpp, objective-c

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Component: Type Libraries File Format: Mach-O Impact: Medium

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.

Vorherrschende Sprache
C++
Sterne
1.3k
Forks
298
Ø Merge
5 T. 5 Std.
Gemergte PRs (30 T.)
19

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Vector35/binaryninja-api

Alle Issues in Vector35/binaryninja-api

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.