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

Control flow wrong for switch statements #15

Open
austin-ralls-cs opened this issue Feb 4, 2020 · 0 comments
Open

Control flow wrong for switch statements #15

austin-ralls-cs opened this issue Feb 4, 2020 · 0 comments
Labels
android Issue about Android (Dex, Smali, etc.) binaryninja Issue about Binary Ninja integration broken Something should be working but isn't major Big things that need to be fixed before this is "good"

Comments

@austin-ralls-cs
Copy link
Member

packed-switch and sparse-switch instructions do not have branches set. Methods with these instructions will not have the full control flow graph, and will probably not disassemble completely.


More than two branches can't be added to an InstructionInfo object in get_instruction_info: https://github.com/CarveSystems/banjo/blob/bd07db6c3a8de9b4eff56d381c581909b0ea2b05/architecture.py#L99-L108

According to rss, the right way to do this is to use LLIL_JUMP_TO in LLIL. I couldn't figure out how to do this. My best attempt (does not work):

https://github.com/CarveSystems/banjo/blob/bd07db6c3a8de9b4eff56d381c581909b0ea2b05/architecture.py#L170-L174

@austin-ralls-cs austin-ralls-cs added binaryninja Issue about Binary Ninja integration android Issue about Android (Dex, Smali, etc.) broken Something should be working but isn't major Big things that need to be fixed before this is "good" labels Feb 4, 2020
@austin-ralls-cs austin-ralls-cs pinned this issue Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Issue about Android (Dex, Smali, etc.) binaryninja Issue about Binary Ninja integration broken Something should be working but isn't major Big things that need to be fixed before this is "good"
Projects
None yet
Development

No branches or pull requests

2 participants