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

Optimization info for removed parameters is not updated correctly #19

Closed
netomi opened this issue Dec 13, 2019 · 1 comment
Closed

Optimization info for removed parameters is not updated correctly #19

netomi opened this issue Dec 13, 2019 · 1 comment
Labels
bug Potential bug in ProGuard.

Comments

@netomi
Copy link

netomi commented Dec 13, 2019

When optimizing parameters of methods might get removed.

After unused parameters have been removed their corresponding optimization info must be removed as well.

For this purpose the UnusedParameterOptimizationInfoUpdater is used. Unfortunately it uses an AllParameterVisitor to visit all parameters. This one uses internally the descriptor of the method to traverse all parameters. Unfortunately, at this stage, the descriptor is already updated, thus not all parameters are visited.

If a parameter at the end is removed, there is no problem, but if parameters with arbitrary indexes are removed, there are inconsistencies.

The code can not used an AllParameterVisitor, but in fact has to traverse all parameters similar to the ParameterShrinker executed right before it.

@netomi netomi self-assigned this Dec 13, 2019
@netomi netomi added the bug Potential bug in ProGuard. label Dec 18, 2019
@mrjameshamilton
Copy link
Collaborator

Fixed here: 2ba28f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Potential bug in ProGuard.
Projects
None yet
Development

No branches or pull requests

2 participants