Comments (5)
I chatted with @jsjeon about this bug this morning. He agrees that redexer is incorrectly calculating the type of the opcode, and subsequently putting a move/from16
rather than a move-object/from16
. The bug here is somewhere around this line of code:
https://github.com/plum-umd/redexer/blob/master/src/modify.ml#L1296
I'm looking into this bug now.
from redexer.
As mentioned in person, the opr_expander
pass not only adjusts opcodes according to the new range of operands, but also insert prologue/epilogue code, if necessary. if-ne
is one of those examples: it uses only for bit operands, and thus we need an instruction to move around the operand.
According to bytecode dump @kmicinski sent to me, there is a backward control-flow, where v18 holes an object. At the same time, in a normal pass, v18 may have an integer constant. Therefore, data-flow analysis concluded that the type of v18 is just top
I guess, and chose move/from16
, which is somewhat general.
I wonder replacing it with move-object/from16
still doesn't resolve this issue, since there are multiple paths that use the same register with different types. The workaround I can come up with is actually using the other free register whose type (inferred via data-flow analysis) is more accurate than just top.
from redexer.
It sounds like the correct solution is to modify the instrumentation to attempt to use another register of the right sort when the analysis calculates top
for the category, yes?
from redexer.
Right, but as you pointed out, that data-flow analysis (reaching definition) should be fixed, too.
from redexer.
This issue should be merged with #19.
The current fix is going to happen after white/blacklist configuration for various methods in redexer, but after #19 is implemented correctly this should go away
from redexer.
Related Issues (20)
- redexer against facebook.apk HOT 1
- Redexer crashes during logging HOT 4
- Logging instrumentation inserts `onCreate` etc.. even if methods are final in superclass HOT 1
- Check fine grained regex based logging for method entries along with calls
- Redexer doesn't instruments runnable functions.
- Implement proper dataflow analysis for reaching definitions using a powerset lattice for register
- Try / catch blocks are dropped when logging
- Make fail with can't find SHA library HOT 10
- the discuss of 'directed exploration' HOT 8
- zipalign is removed in new sdk tools HOT 1
- `trans_adder` pass mangles method links HOT 7
- Multi-dex support HOT 1
- Logger fails to account for static methods, assumes all will have at least one param
- Redexer infinite-loops on some APKs
- basic apk logging issue HOT 4
- Dex API too leaky: tries length vs tries
- [master branch] redexer throws Exception: DynArray.Invalid_arg HOT 1
- compilation issue
- Extract the disassemly and DEX parsers into separate opam packages HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redexer.