-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Replacing constant issue[core] #1277
Comments
@redmi111 do you want an option to enable only R constant replacement? |
That might actually avoid this issue but not sure if it also will replace other constants properly. |
I don't see any improper replace in your example. Can you point me which parts are incorrect? |
There are no incorrect replacements but missing replacements for a few fields where there is no value from any context. For example take a field like below,
Actually, this doesn't happen every time (as long as the value was found somewhere in the code, it can be in a different class or in the same class different field) When there is no value found for it then it skips that. |
@redmi111, look at the byte code and be surprised that if the final field is static, then a reference to it is not used, but the value is taken immediately. I don't see critical bug here. |
@redmi111 I commit a fix for a missing field init values. This issue depends on processing order and occur if several thread used for decompilation. Not sure if it was your issue, so please check latest unstable build. |
I noticed this bug in Replace constants option. When the replace constant is unchecked the values on constant fields are properly decoded (but lose R classes info as we're not replacing constants) and when I check that option R classes constants are properly decoded but the constants in the fields are lost (not decoded I mean not available).
Example:
In the above pic Take a look at the CHARSET field and it actually with the Replace constant checked but since there is a constant value available in bytecode it uses STRING_CHARSET_NAME but when there is no such available in bytecode the field declaration was empty.
Above one is with Replace constant unchecked.
The text was updated successfully, but these errors were encountered: