Skip to content

IRList.structural_equals doesn't handle some instructions #778

@fengruisd

Description

@fengruisd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions