-
Notifications
You must be signed in to change notification settings - Fork 653
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
IRTypeChecker false negative when using INVOKE_SUPER on interface default method #695
Comments
Would you be interested in submitting a patch? |
The dex spec (https://source.android.com/devices/tech/dalvik/dalvik-bytecode) says:
Redex does not fully support version 037. Various Redex optimization passes will silently do the wrong thing when given interface methods on invoke-super instructions, so we added this explicit check in the IRTypeChecker to stop that from happening. There's no easy true fix in Redex here, we'd need to audit and upgrade all passes. Instead, the error message points out what likely happened, and where to fix this:
|
So this is mostly WAI due to the difficulty of updating for 037+? Given that the IRTypeChecker will trigger on legal code, I'd suggest updating the error message to indicate non-compatibility with 037+ features, of which calling super into a default interface method is one of them. |
I'm happy to provide a patch, but I'm not certain what scope of fix you're going to accept. Locally, I'm planning on disabling the check to focus on other merge/integration issues that might be hiding behind this until it gets resolved. I can't have my company stop usage of interface default methods, especially since it's part of the official Android API. |
It seems that IRTypeChecker will trigger on an
INVOKE_SUPER
when called legally on an interface method with a default implementation.I don't have a good minimal reproduction, but it should be relatively easy to make if you modify an existing application to use
Animator.AnimatorListener.onAnimationEnd(Animator, boolean)
https://developer.android.com/reference/android/animation/Animator.AnimatorListener#onAnimationEnd(android.animation.Animator,%20boolean).I'm using a modified repository merged at 6eb187d so it's difficult to reproduce with a head version of this repo.
Here's a redacted error message. I've removed the bytecode print since it's mostly useless as it's only the INVOKE_SUPER that is important here.
The text was updated successfully, but these errors were encountered: