Skip to content

src not considered as side reg in gadgets like xchg dst, src #31

Description

@845977

The register src is wrongfully in excluded side regs when side effects are constructed:

rop3/rop3/gadget.py

Lines 62 to 64 in 95f6cb9

def calculate_side_effects(self) -> None:
arch = arch_singleton.arch
excluded = {arch.normalize_reg(r) for r in (self.dst, self.src, arch.sp) if r is not None}

Gadgets like xchg dst, src modify src as side effect.

Suggested fix: remove self.src

Activity

  1. ricardojrdez commented on Jul 3, 2026

    @ricardojrdez
    Member

    Fixed in #35 (merged as c0fd559).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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