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

Rewrite block sorting and placment so that unreachable blocks are processed. #1428

Merged
merged 2 commits into from Apr 6, 2019

Conversation

Projects
None yet
3 participants
@karliss
Copy link
Contributor

karliss commented Apr 5, 2019

Change block processing order so that unreachable blocks and edges between them are also placed. Prevents unreachable blocks from being stacked in corner (#1419).

Also prevents some instances of same row edges, and upwards going edges that are not part of loop.

From the comments on top of some unreachable blocks it seems that there might be a bug in cutter code preparing input for GraphView, looks like r2 has identified those blocks as part of case switch/case statement.

Test plan (required)

Closing issues

Closes #1419

Rewrite block sorting and placment so that unreachable blocks are pro…
…cessed.

* Use DFS instead of Kahn's algorithm for toposort as it makes it easier
to deal with loops.
@xarkes

This comment has been minimized.

Copy link
Member

xarkes commented Apr 6, 2019

Can you show a screenshot of the new behaviour?

Show resolved Hide resolved src/widgets/GraphGridLayout.cpp Outdated
@karliss

This comment has been minimized.

Copy link
Contributor Author

karliss commented Apr 6, 2019

Example of case blocks without properly analyzed edges being placed the same as everything else instead of being stacked on top of each other.

Ekrānattēls no 2019-04-06 13-47-37

The input data preparation bug I mentioned in description seems to be on the r2 side as it showed the same case blocks without incoming edges.

@ITAYC0HEN
Copy link
Member

ITAYC0HEN left a comment

Looks good here :)

@xarkes

xarkes approved these changes Apr 6, 2019

@ITAYC0HEN ITAYC0HEN merged commit 0583b06 into radareorg:master Apr 6, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.