angr / angr

A powerful and user-friendly binary analysis platform!
http://angr.io
BSD 2-Clause "Simplified" License
7.46k stars 1.07k forks source link

Overlapping blocks in decompiled AIL graph #3869

Open bluesadi opened 1 year ago

bluesadi commented 1 year ago

Description

Assembly graph: image

AIL graph (seems that something went wrong when handling the 0x40050f block): image

Steps to reproduce the bug

angr-management land32_arm

land32_arm.zip

Environment

/home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/angr/misc/bug_report.py:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
angr environment report
=============================
Date: 2023-03-19 20:01:00.686934
Running in virtual environment at /home/bluesadi/virtualenvs/Yasat
Platform: linux-x86_64
Python version: 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0]
######## angr #########
Python found it in /home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/angr
Pip version angr 9.2.42
Couldn't find git info
######## ailment #########
Python found it in /home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/ailment
Pip version ailment 9.2.42
Couldn't find git info
######## cle #########
Python found it in /home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/cle
Pip version cle 9.2.42
Couldn't find git info
######## pyvex #########
Python found it in /home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/pyvex
Pip version pyvex 9.2.42
Couldn't find git info
######## claripy #########
Python found it in /home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/claripy
Pip version claripy 9.2.42
Couldn't find git info
######## archinfo #########
Python found it in /home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/archinfo
Pip version archinfo 9.2.42
Couldn't find git info
######## z3 #########
Python found it in /home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/z3
Pip version z3-solver 4.10.2.0
Couldn't find git info
######## unicorn #########
Python found it in /home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/unicorn
Pip version unicorn 2.0.1.post1
Couldn't find git info
######### Native Module Info ##########
angr: <CDLL '/home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/angr/state_plugins/../lib/angr_native.so', handle 34586b0 at 0x7fa014439e50>
unicorn: <CDLL '/home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/unicorn/lib/libunicorn.so.2', handle 2d7a3c0 at 0x7fa019641fd0>
pyvex: <cffi.api._make_ffi_library.<locals>.FFILibrary object at 0x7fa01a1d7550>
z3: <CDLL '/home/bluesadi/virtualenvs/Yasat/lib/python3.8/site-packages/z3/lib/libz3.so', handle 317a440 at 0x7fa016395310>

Additional context

No response

bluesadi commented 1 year ago

This problem does not exist in angr 9.2.41 image

ltfish commented 1 year ago

Turn off the optimization Duplicate return blocks to reduce goto statements in decompilation options.