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

[core] Use of registers in constructor calls #717

Closed
bagipro opened this issue Jul 22, 2019 · 2 comments
Closed

[core] Use of registers in constructor calls #717

bagipro opened this issue Jul 22, 2019 · 2 comments
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented Jul 22, 2019

Checks before report

Describe error
Class com.paypal.android.p2pmobile.appconfig.configNode.AtmFinderConfig

    public AtmFinderConfig() {
        super(r1, r2, r3, r4, r5, r6);
        Boolean valueOf = Boolean.valueOf(false);
        EciDCSKeys eciDCSKeys = new EciDCSKeys("atmFinder", valueOf);
        EciDCSKeys eciDCSKeys2 = new EciDCSKeys("atmFinderLayout", "map");
        EciDCSKeys eciDCSKeys3 = new EciDCSKeys("atmFinderSearch", "address");
        EciDCSKeys eciDCSKeys4 = new EciDCSKeys("atmFinderShowRecent", valueOf);
        Boolean valueOf2 = Boolean.valueOf(true);
        EciDCSKeys eciDCSKeys5 = new EciDCSKeys("atmFinderShowSearchBar", valueOf2);
        EciDCSKeys eciDCSKeys6 = new EciDCSKeys("atmFinderEnableTabOnMapDisableTabOnList", valueOf2);
    }

If a result of execution is used only once, can it be inlined?

APK: https://drive.google.com/file/d/1fCN9PXu8Zw4Kdnhgd0_qmzEvgWLfEU-9/view?usp=sharing

@bagipro bagipro added bug Core Issues in jadx-core module labels Jul 22, 2019
@skylot
Copy link
Owner

skylot commented Jul 22, 2019

If a result of execution is used only once, can it be inlined?

Jadx usually does this, but with a condition: method invocation order must be preserved. And in this case, it is not possible because of Boolean.valueOf(true); method. Anyway, that boolean variables used twice so they will not be inlined. To fix this issue I need to implement "reboxing" to convert valueOf call to constants. So it is not a bug fix but a whole new feature :)

P.S. In the previous version of apk (2019-06-20) there is no such issue in this method and this is sad :(

@skylot
Copy link
Owner

skylot commented Jul 23, 2019

I commit initial deboxing implementation. Issue fixed.
But regressions are expected, feel free to report :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants