redex icon indicating copy to clipboard operation
redex copied to clipboard

IRList.structural_equals doesn't handle some instructions

Open fengruisd opened this issue 2 years ago • 0 comments
trafficstars

IRList.structural_equals does not handle MFLOW_FALLTHROUGH and instructions at the end of method.

if there are 2 methods

  • method1's IR:
    return-void
  • method2's IR:
  FALLTHROUGH
  return-void
  FALLTHROUGH or DEBUG or POSITION

the 2 method should be "structural equals", but redex return false, because

  1. structural_equals does not skip FALLTHROUGH
  2. structural_equals does not skip useless instructions at the end of method2, which means that the pointer of method1 reaches the end first, while the pointer of method2 still points to the useless instruction.

fengruisd avatar Mar 30 '23 07:03 fengruisd