-
Notifications
You must be signed in to change notification settings - Fork 33
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
opr_expander
pass generates ill typed code for if-ne
instruction
#18
Comments
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 https://github.com/plum-umd/redexer/blob/master/src/modify.ml#L1296 I'm looking into this bug now. |
As mentioned in person, the 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 I wonder replacing it with |
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 |
Right, but as you pointed out, that data-flow analysis (reaching definition) should be fixed, too. |
In the "wedding planner" app @eldr4d linked, there was a specific issue that caused badly formed code after rewriting. The original error thrown by the verifier is:
The reason why this is happening is that in the instrumented bytecode, the method
org.codehaus.jackson.map.ser.std.MapSerializer.serializeTypedFields
contains malformed bytecode at the address0x004CEEDE
. The offending instruction at that address is:This comes as the result of a "cleanup" pass within redexer: the
opr_expander
pass in theModify
module. The purpose of this pass is to fix up bytecode instructions that have been thrown out of range by instrumentation. After instrumenting redexer to print the instructions that are replaced as a result of this phase, I have realized that the original instruction replaced is:The instruction sequence is replaced with
This is a necessary step, because
if-ne
only works on four bit operands. But the problem is that v1 is somehow causing a type error? I'm not sure what's happening, so I need to look into the machinery that's being used to allocate registers in this phase.The text was updated successfully, but these errors were encountered: