Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function pointer multiple dispatch #24

Open
hudson-ayers opened this issue Jun 2, 2022 · 0 comments
Open

Function pointer multiple dispatch #24

hudson-ayers opened this issue Jun 2, 2022 · 0 comments

Comments

@hudson-ayers
Copy link
Contributor

Hi, I am curious if you have any thoughts on what it would take to support function pointers which could resolve to multiple target functions. This line seems to be the relevant location where Haybale currently gives up if a function pointer can resolve to multiple functions. Would it be possible for other (still small) values of n to treat function pointer calls as effectively branching points, with each possibly destination representing an additional path? Presumably there are reasons this is difficult and as such not supported currently.

I am mostly curious because I have been maintaining a fork of Haybale which uses custom, Rust specific logic to handle Rust dynamic dispatch by identifying possible targets of dynamic dispatch by parsing LLVM-IR debug info + Rust's MIR to find valid concrete functions at dynamic dispatch points. If Haybale had general support for function pointers with multiple targets, I could simplify this implementation such that it could maybe just be a user-defined hook rather than a direct modification of Haybale itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant