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

Real-world deoptimization cases in binaries #7

Open
mahaloz opened this issue Nov 9, 2023 · 0 comments
Open

Real-world deoptimization cases in binaries #7

mahaloz opened this issue Nov 9, 2023 · 0 comments
Labels
discussion Discussions on SAILR

Comments

@mahaloz
Copy link
Owner

mahaloz commented Nov 9, 2023

Overview

This issue lists a few examples of binaries and functions that have had optimizations applied on them. These opts are documented in the SAILR paper into three categories:

  • Irreducible Statement Duplication: opts that duplicate code
  • Irreducible Statement Condensing: opts that turn ncode statements into less statements
  • Misc: currently on Switch Lowering (converts switches into bad ifs)

The attached binaries and source are from Coreutils 9.1 and have been compiled with GCC 9 on optimization level O2, with inlining disabled. Each case below is shown as binary_name: function_name. Some cases come with a testcase to see what they should look like. In every case below, the SAILR version of angr should produce better results than IDA Pro 8.0. The best way to understand what happened in each of these cases is to take look at the corresponding source file to the function.

Cases

ISD Opts

ISC Opts

Misc Opts (Switch Lowering)

Binaries and Source

Both are attached here:
coreutils_src_and_bin.tar.gz

In this directory, you will also find angr_sailr_*, ida_* and ghidra_*, which is the associated decompilation for each of those files :).

@mahaloz mahaloz added the discussion Discussions on SAILR label Nov 9, 2023
@mahaloz mahaloz changed the title Real-world Deoptimization Cases in Binaries Real-world deoptimization cases in binaries Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussions on SAILR
Projects
None yet
Development

No branches or pull requests

1 participant