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

META - Fix analysis #4868

Closed
1 of 11 tasks
ret2libc opened this issue May 12, 2016 · 14 comments
Closed
1 of 11 tasks

META - Fix analysis #4868

ret2libc opened this issue May 12, 2016 · 14 comments
Assignees
Labels
hardcore Extremely hard issues to fix, or features to implement META RAnal refactor

Comments

@ret2libc
Copy link
Contributor

ret2libc commented May 12, 2016

  • fix Graph view doesn't handle unaligned opcodes #10420
  • remove maximum basic block size
  • remove maximum function depth
  • remove maximum function size
  • re-implement recursive disassembly with a stack, making it iterative. We should implement a working recursive disassembly (afr doesn't work and other analysis seems to do hackish things)
  • remove concept of realsize and size, there is only one size, and it's the sum of the sizes of the basic blocks the function is composed of
  • fix wrong assumption spread almost everywhere that an address is part of a function only if it's between the starting address and the "ending address"(start + size). This is not true because a function can be split in non contiguous places. Update: Done in many places, but it has to be checked and improved again
  • propagate no-return status when all paths of a function calls known no-return functions
  • add code and data refs while doing analysis
  • functions can have shared basic blocks or they can jump or goto the basic block of another function
  • define data in portions of the executable segment where nothing was found or mark it as code only if it doesn't overlap with known functions. This way visual disassembly will not have problems "skipping" data between basic blocks and such. (review adf and adfg, they do not always work well)

Function API proposal:

  • r_anal_fcn_size for the size of the function, that is sum(bbs)
  • r_anal_fcn_firstaddr for the minimum address in a function
  • r_anal_fcn_lastaddr for the maximum address in a function
  • r_anal_fcn_addr for the entry address of a function
  • r_anal_fcn_range for max-min, that is r_anal_fcn_lastaddr - r_anal_fcn_firstaddr
@ret2libc ret2libc added the RAnal label May 12, 2016
@ret2libc ret2libc added this to the 0.10.5 milestone May 12, 2016
@XVilka XVilka added refactor hardcore Extremely hard issues to fix, or features to implement labels May 12, 2016
@XVilka
Copy link
Contributor

XVilka commented May 12, 2016

@ret2libc
Copy link
Contributor Author

Yes, even if this is more about correctness of the analysis than about performance or user-friendliness.

@rlaemmert
Copy link
Contributor

How about handling vtables to get hints in c++ code?

@ret2libc
Copy link
Contributor Author

This bug tries to keep together issues related to code analysis. Vtables are just an array of function pointers and for an initial refactoring of the code related to Analysis, I think they are not uber necessary. It can be handled in a separate issue though :)

@Maijin
Copy link
Contributor

Maijin commented Aug 15, 2016

@rlaemmert you can now print vtables using av

@radare
Copy link
Collaborator

radare commented Oct 6, 2016

this is a long-story , not everything is gonna be fixed for the next release. please choose the ones you think they can be done or the ones you can do in 1 month and create specific issues for them

@radare radare modified the milestones: 9999, 1.0.0 Oct 6, 2016
@Maijin Maijin mentioned this issue Feb 12, 2017
@radare
Copy link
Collaborator

radare commented Feb 13, 2017

I miss the symsize here, but agree about that api

@XVilka
Copy link
Contributor

XVilka commented Feb 28, 2017

For OS X vtables parsing https://github.com/cocoahuke/maclook4ref

@Maijin
Copy link
Contributor

Maijin commented Feb 28, 2017

@XVilka better open a separated issue for this.

@Maijin Maijin changed the title [META] Fix analysis META - Fix analysis Mar 8, 2017
@Maijin Maijin added the META label Mar 8, 2017
@XVilka XVilka modified the milestones: 9999, 2.9.0 - pre-r2con May 17, 2018
@XVilka
Copy link
Contributor

XVilka commented May 17, 2018

@ret2libc can you please update the issue to the current situation?

@ret2libc
Copy link
Contributor Author

This is very hard for me (as for everybody else i think) to do. I'd need to review all the analysis code base. Maybe we have done 1 or 2 of these checks.

@radare radare modified the milestones: 2.9.0, 3.1.0 Aug 31, 2018
@radare radare removed this from the 3.1.0 milestone Oct 29, 2018
@radare radare added this to the 3.4.0 - aprils milestone Oct 29, 2018
@radare
Copy link
Collaborator

radare commented Oct 29, 2018

I dont think we can focus on analysis yet, so moving to 3.4

Also, this is the most important analysis bug right now: #10420

@radare radare modified the milestones: 3.5.0, 3.6.0 May 10, 2019
@radare radare removed this from the 3.6.0 milestone Jun 17, 2019
@XVilka
Copy link
Contributor

XVilka commented Apr 29, 2020

Please update the issue, maybe split.

@ret2libc
Copy link
Contributor Author

ret2libc commented Jul 9, 2020

Let's close this. It is very old and it's better to split stuff anyway.

@ret2libc ret2libc closed this as completed Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardcore Extremely hard issues to fix, or features to implement META RAnal refactor
Projects
None yet
Development

No branches or pull requests

6 participants