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

Make afs respect the cc (Fix #3291) #3292

Merged
merged 1 commit into from
Jan 15, 2023
Merged

Make afs respect the cc (Fix #3291) #3292

merged 1 commit into from
Jan 15, 2023

Conversation

thestr4ng3r
Copy link
Member

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • 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

Applying a function signature with afs to a function was using a combination of the existing args and wrong stack addresses to apply the args to function variables. This generally resulted in incorrect locations. Instead, we now use the info from the cc.

Test plan

see the added test and issue noted below

Closing issues

Fix #3291

Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

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

Not a big fan of the rz_analysis_function_delete_vars_by_arg_property name though

@thestr4ng3r
Copy link
Member Author

suggestions welcome

@XVilka
Copy link
Member

XVilka commented Jan 15, 2023

No better idea either, TBH. Maybe other people could come with it?

librz/analysis/var.c Outdated Show resolved Hide resolved
librz/analysis/var.c Outdated Show resolved Hide resolved
Applying a function signature with afs to a function was using a
combination of the existing args and wrong stack addresses to apply the
args to function variables. This generally resulted in incorrect
locations. Instead, we now use the info from the cc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Applying function signature swaps arguments with 'fastcall' cc.
4 participants