-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
drop out-of-bounds parameters in the dropInvalidMappings
command
#161
Comments
Since #168 they are dropped if their index is lower than the minimum. Information from the bytecode is required for the maximum enigma/enigma/src/main/java/org/quiltmc/enigma/api/analysis/index/jar/EntryIndex.java Lines 81 to 86 in 2e3a60d
|
finding the number of parameters is hard since it spills over into the LVT |
I just realized you can parse the descriptor and figure it out that way (plus knowing if its a static vs instance method) |
am I insane? the issue I ran into implementing this is knowing if it was static based on the descriptor |
I dont think there is a way to know unless you have indexed the jar. I remember aurora having this issue when working on the matcher |
When matching you'd have to index the previous jar (we don't do this currently) to know if a method changed and shift its parameters accordingly. In enigma we just need to validate and drop if any parameters are invalid. |
maybe we could do it as an arg you pass to the command? |
when methods change to and from static, it can occasionally leave parameters with indices that are outside of the method's parameter bounds. this means that those parameters are useless and just take up space in mappings -- they should be tossed
The text was updated successfully, but these errors were encountered: