redex
redex copied to clipboard
IRList.structural_equals doesn't handle some instructions
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
structural_equalsdoes not skipFALLTHROUGHstructural_equalsdoes not skip useless instructions at the end ofmethod2, which means that the pointer ofmethod1reaches the end first, while the pointer ofmethod2still points to the useless instruction.