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

Compact xrefs #10718

Merged
merged 3 commits into from Jul 14, 2018
Merged

Compact xrefs #10718

merged 3 commits into from Jul 14, 2018

Conversation

@cyanpencil
Copy link
Contributor

@cyanpencil cyanpencil commented Jul 12, 2018

Closes #10253

2018-07-12-040420_682x176_scrot

@cyanpencil cyanpencil force-pushed the cyanpencil:compact-xrefs branch from 1f132d0 to 5f4bda1 Jul 12, 2018
@cyanpencil cyanpencil force-pushed the cyanpencil:compact-xrefs branch from 5f4bda1 to 00fce4b Jul 12, 2018
Copy link
Contributor

@ret2libc ret2libc left a comment

The change seems right (apart the free of name), though I think a bit of refactoring would help... the two parts are quite similar. Probably though It wouldn't be easy

next_fun = r_anal_get_fcn_in (core->anal, next_addr, -1);
if (next_fun && next_fun->addr == fun->addr) {
r_list_append (addrs, refi->addr);
continue;

This comment has been minimized.

@ret2libc

ret2libc Jul 12, 2018
Contributor

name is not freed

next_f = r_flag_get_at (core->flags, next_addr, true);
if (next_f && f->offset == next_f->offset) {
r_list_append (addrs, refi->addr - f->offset);
continue;

This comment has been minimized.

@ret2libc

ret2libc Jul 12, 2018
Contributor

name is not freed

@cyanpencil
Copy link
Contributor Author

@cyanpencil cyanpencil commented Jul 13, 2018

Thanks for the feedback @ret2libc ,
you are absolutely right about the missing free, I'll fix it right now.
I'll try also to refactor the two similar pieces into one, but I'm not very sure on how to do that right now ^^

@ret2libc
Copy link
Contributor

@ret2libc ret2libc commented Jul 13, 2018

Yeah don't worry about the refactoring.. It was just a comment, but I guess for the moment it's ok as it is... I don't see an easy way to refator this either

@XVilka XVilka merged commit 704a497 into radareorg:master Jul 14, 2018
2 checks passed
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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants