-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Try Catch Improvement #4305
base: dev
Are you sure you want to change the base?
Try Catch Improvement #4305
Conversation
Your checklist for this pull request - [x] I've read the guidelines for contributing to this repository - [x] I made sure to follow the project's coding style - [ ] I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why. - [ ] I've added tests that prove my fix is effective or that my feature works (if possible) - [ ] I've updated the rizin book with the relevant information (if needed) Detailed description Bin - Load exception information by default Analysis - Make analyzing exception scopes the default - Analyze all exception sources as functions - Do not hack basic blocks flow to add try/catch information Graph - Add an edge pointing to the catch block for each basic block inside the try scope - Add configuration graph.trycatch to control if graphing the exception blocks is enabled Problems 8ff06e9 Is basically copy-pasted logic from block.c This can make graphs a lot noisier Cutter will have to implement its own version of the logic if it wants to copy rizin in showing the connection between the blocks and its catch blocks I didn't add tests yet Test plan Open bins\pe\microsoft_seh_tests\x64\xcpt4.exe for example Optional: idp to load debug info for binary aaa Optional: .iw to show try catch scopes as flags s main Enter visual graph mode, make sure all edges, lines are painted correctly, and that there area now new edges pointing each basic block to its catch block if it is inside a try scope Open file from rizinorg#2247 aaa s main Enter visual graph mode, make sure issue is fixed Closing issues Closes rizinorg#2247
} | ||
title = get_title(catch_bb->addr); | ||
v = rz_agraph_get_node(g, title); | ||
free(title); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
free(title); | |
RZ_FREE(title); |
Use RZ_FREE when a pointer is reused.
RZ_FREE will invoke free
and also set the freed pointer to NULL
.
rz_core_analysis_calls(core, false); // "aac" | ||
(void)rz_core_analysis_calls(core, false); // "aac" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@j-barnak there are a lot of conflicts, please rebase. |
Note: This is a WIP
Your checklist for this pull request
Detailed description
Bin
Analysis
Graph
Problems
Test plan
Open bins\pe\microsoft_seh_tests\x64\xcpt4.exe for example
Optional: idp to load debug info for binary
aaa
Optional: .iw to show try catch scopes as flags
s main
Enter visual graph mode, make sure all edges, lines are painted correctly, and that there area now new edges pointing each basic block to its catch block if it is inside a try scope
Open file from #2247
aaa
s main
Enter visual graph mode, make sure issue is fixed
Closing issues
Closes #2247