Error 1: Memory operand type destroyed by set_dst / set_src
_parse_type correctly sets self.type = op_mem for [dst] and [src] placeholders, but both set_dst and set_src unconditionally overwrite self.type to op_reg (or op_imm) when a concrete value is provided, discarding the memory type entirely.
Error 2: set_dst rejects immediate values
|
def set_dst(self, dst): |
|
if self.is_dst(): |
|
self.reg = dst |
|
self.generic = False |
|
self.type = arch_singleton.arch.op_reg |
set_src tries _parse_imm before falling back to a register name, so --src 4 or --src 0x10 correctly produces an op_imm operand. set_dst had no equivalent and should do the same.
Error 3: Generic mem addresses can be resolved into immediates
|
if self.generic and self.is_src() and operand.type == arch_singleton.arch.op_imm: |
|
return (True, operand.value.imm) |
This is not desired behaviour, mov rax, 0xCAFE is not a ROPLang load.
Error 1: Memory operand type destroyed by
set_dst/set_src_parse_typecorrectly setsself.type = op_memfor[dst]and[src]placeholders, but bothset_dstandset_srcunconditionally overwrite self.type to op_reg (or op_imm) when a concrete value is provided, discarding the memory type entirely.Error 2:
set_dstrejects immediate valuesrop3/rop3/operation.py
Lines 250 to 254 in 95f6cb9
set_srctries_parse_immbefore falling back to a register name, so--src 4or--src 0x10correctly produces anop_immoperand.set_dsthad no equivalent and should do the same.Error 3: Generic mem addresses can be resolved into immediates
rop3/rop3/operation.py
Lines 274 to 275 in 95f6cb9
This is not desired behaviour,
mov rax, 0xCAFEis not aROPLangload.