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

api.idaapi.FlowChart infinite loop #68

Open
talangcc opened this issue Jun 29, 2019 · 3 comments
Open

api.idaapi.FlowChart infinite loop #68

talangcc opened this issue Jun 29, 2019 · 3 comments
Labels
Milestone

Comments

@talangcc
Copy link

I want to get all basicblocks of all functions, so I use the api.idaapi.FlowChart(func_t) in my code. I find that sometimes it never ends when the binary is a bit large, so I debug it.
I find that when it encounter a basic block including the instruction "jmp func_name", it will continue exploring the function func_name and the situation is also appeared in a single function thunk located at ".plt" section. How can I stop exploring further when it encouter the instruction "jmp func_name" or is there any other ways to get all basicblocks of all functions?

@williballenthin
Copy link
Owner

hey @talangcc thanks for reporting this issue.

to make sure i understand the issue, is the problem that:
when computing the control flow graph, the algorithm traverses nodes and does not stop when reaching another function via tail jmp/thunk?

can you provide references to any binaries that show this behavior? this will make it easier to develop a fix.

@talangcc
Copy link
Author

talangcc commented Jul 6, 2019

Sorry, I made a mistake in the title, it should be api.idaapi.FlowChart.
The situation happened when it call a function use jmp instruction like this(0x53c04c):
0x53c04c jmp sub_53a630
and sub_53a630 is a function. When I use the api.idaapi.FlowChart in this function, it will exploring the function sub_56a630, and it seems never end.
image
gvim.zip

@talangcc talangcc changed the title api.idc.GetFunctionName infinite loop api.idaapi.FlowChart infinite loop Jul 6, 2019
@sezangel
Copy link

I have a question,is that how can you get func_t by python-idb?? Did you use the function idaapi.get_func(),but when i use it, it has an error ,showed that the api.idaapi.get_func() is wrong.'idaapi' object has no attribute 'get_func'

@XVilka XVilka added this to the 0.8.0 milestone Aug 28, 2020
@XVilka XVilka added the bug label May 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants