Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use seto to look for overflow #405

Open
danakj opened this issue Nov 19, 2023 · 0 comments
Open

Use seto to look for overflow #405

danakj opened this issue Nov 19, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@danakj
Copy link
Collaborator

danakj commented Nov 19, 2023

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++.

@danakj danakj added the enhancement New feature or request label Nov 19, 2023
@danakj danakj added this to the stable-numerics milestone Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant