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

bug: tracking issue: shared mutability #178

Open
3 tasks done
Linus789 opened this issue May 20, 2023 · 1 comment · May be fixed by #329
Open
3 tasks done

bug: tracking issue: shared mutability #178

Linus789 opened this issue May 20, 2023 · 1 comment · May be fixed by #329
Labels
Bug report Something isn't working

Comments

@Linus789
Copy link

Linus789 commented May 20, 2023

Type

Error at runtime

Bug description

Occurred in ReVanced/revanced-patches#2177

Steps to reproduce

Two patches modify the same method but don’t use a mutableMethod to resolve the instruction indices, so that the indices of the original method are used which might be invalid after one patch has already modified the method.

Relevant log output

[0x93] register v6 has type Long (Low Half) but expected Precise Reference: java.lang.String

Screenshots or videos

No response

Solution

No response

Additional context

Temporary fix for spoof-wifi-connection implemented in ReVanced/revanced-patches#2199

Acknowledgements

  • I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • I have written a short but informative title.
  • I filled out all of the requested information in this issue properly.
@Linus789 Linus789 added the Bug report Something isn't working label May 20, 2023
@oSumAtrIX oSumAtrIX transferred this issue from ReVanced/revanced-patches-template May 24, 2023
@LisoUseInAIKyrios LisoUseInAIKyrios linked a pull request Mar 9, 2025 that will close this issue
@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Mar 9, 2025

Issue is fixed by using a class method pool starting with all immutable methods. After a mutable method is requested, the immutable method is upgraded to mutable and replaced in the pool. Then when other patches/fingerprints match, they match the instruction indexes of the newly modified method.

https://github.com/LisoUseInAIKyrios/revanced-patcher/blob/feat/instruction_filters/src/main/kotlin/app/revanced/patcher/util/PatchClasses.kt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants