Vector35 / Vector35/binaryninja-api
Automatically type all block arguments in function definitions with Block_literal *
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 1.3k
- Fork
- 298
- Merge medio
- 5g 5h
- PR unite (30g)
- 19
Descrizione
When parsing Objective-C and Swift function metadata, you often encounter blocks which are stack or global closures.
When you encounter these, apply a copy of the type Block_literal * to them.
struct Block_literal {
void *isa; // Pointer to block's class ("isa" pointer)
int flags; // Block flags
int reserved; // Reserved for future use
void (*invoke)(void *, ...); // Function pointer to the block's code
struct Block_descriptor *descriptor; // Pointer to block's descriptor
// ... captured variables (optional, not part of base header)
};
This type is the base type of all blocks in Objective-C and Swift. It will enable proper type propagation at all the call sites. The type is just the base type -- it can be further refined by parsing the Block_descriptor. I would prefer you make a copy of the block literal, because each call site will be different and we can fine the type in a second pass.
It goes a long way towards making ObjC and Swift easier to reverse
vs
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
The issue names no source file, test, or entry point. Start by locating the parsing of Objective-C and Swift function metadata and block literals; done means block arguments receive copied Block_literal * types and that type propagation reaches their call sites.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, objective-c, swift
- Ambito
- reverse-engineering
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100