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

Remove duplicated function signature entries #23098

Merged
merged 4 commits into from
Jul 9, 2024

Conversation

satk0
Copy link
Collaborator

@satk0 satk0 commented Jul 8, 2024

  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some lines in the book (optional)

Description

Probably solves the issue #22901. I removed the code that creates new signatures from the same functions.

@@ -958,14 +958,8 @@ R_API int r_sign_all_functions(RAnal *a, bool merge) {
RSignItem *it = NULL;
if (merge || !name_exists (a->sdb_zigns, realname, sp)) {
it = item_from_func (a, fcn, realname);
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix looks good and i think thats a good default behaviour, but maybe we should allow users to have the same signature twice too. maybe we can have the zign.dups config variable for this, and maybe we need to break the abi to add such option inside RAnalOptions. but i think is better to have this feature as an option and disabled by default rather than removing the code. what do you think?

@trufae
Copy link
Collaborator

trufae commented Jul 9, 2024

You can use the RCoreBind field from RAnal.coreb for now to achieve this, put the ConfigGet call outside the loop to avoid perf issues. add a comment for R2_600 to add the field in RAnalOptions this way we dont break the abi.

the option will be disabled by default . add it in core/cconfig.c

@satk0
Copy link
Collaborator Author

satk0 commented Jul 9, 2024

Allright, I will try my best to implement it. Thanks for all the tips 😁

@trufae
Copy link
Collaborator

trufae commented Jul 9, 2024

Looks perfect now :) thank you!

@trufae trufae merged commit 6923af9 into radareorg:master Jul 9, 2024
40 checks passed
@satk0 satk0 deleted the fix-dup-sign branch July 12, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants