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
[WIP] Opcodemadness #681
[WIP] Opcodemadness #681
Conversation
Codecov Report
@@ Coverage Diff @@
## master #681 +/- ##
=========================================
+ Coverage 72.77% 73.5% +0.72%
=========================================
Files 51 51
Lines 16118 16177 +59
=========================================
+ Hits 11730 11891 +161
+ Misses 4388 4286 -102
Continue to review full report at Codecov.
|
…o opcodemadness
Using this, broken or deliberately broken code should be parsable to some extend but not crash androguard. resolves androguard#519
…o opcodemadness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if you didn't removed unwillingly some of your previous changes during merge.
For example, the following line
androguard/androguard/core/bytecodes/dvm.py
Line 4963 in 6ed343b
self.OP, self.AA, self.BBBBBBBB = unpack("<BBI", buff[:self.length]) |
is changed with
androguard/androguard/core/bytecodes/dvm.py
Lines 4937 to 4939 in 3398c92
self.BBBBBBBB = cm.packer["Hi"].unpack(buff[0:6]) | |
self.OP = i16 & 0xff | |
self.AA = (i16 >> 8) & 0xff |
It's the case with many instructions classes (Instruction21h
, Instruction21c
, Instruction21s
, ...)
ah yes.... I'm unsure what the best method is there... I tested my approach on several thousand dex files and found out that many have non zero values in the padding... (for Ins 10t, 20t, 30t). This looks like some sort of parser breaker... for the others, were I changed a I think I'll change them back to |
…o opcodemadness
Maybe keep the one which needs less operations after ? I don't know if such changes in formaters would affect performances |
Well... I found some issues with the interpretation of some opcodes and BOOM you crash the decompiler -.- So there is much much more to do unfortunately... |
For some reason the build fails now but I do not see why... I have not changed anything there and on my machines the called command has an exit code == 0 maybe the problem fixes itself with the next commit, dunno... |
Dropped MethodClassAnalysis and pulled all functions into MethodAnalysis. This should also be slightly faster when creating xrefs, as the method can not be looked up directly instead of using an exhaustive search. resolves androguard#412
@MartinThoma stupid me... I actually changed a lot regarding the callgraph creation! Found the issue and I'm fixing it right now... (I got confused because there were no error messages indicating any fault) |
Ok, nice that you found it :-) |
changing and refactoring disassembly