Skip to content

Use seto to look for overflow #405

@danakj

Description

@danakj

From https://research.checkpoint.com/2023/rust-binary-analysis-feature-by-feature/ we see rust generates seto for integer math, meaning it uses the overflow register rather than checking values being added.

From https://stackoverflow.com/questions/48020613/gcc-inline-asm-x86-cpu-flags-as-input-dependency we see there is __builtin_add_overflow which should generate seto usage.

There’s also some inline asm there but that breaks other optimizations in c++.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions