angr / angr/angr

megatest: DECOMPILER_FAIL-TypeError: unsupported operand type(s) for //: 'NotImplementedType' and 'int'

未关闭
#4,270 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
9.1k
派生
1.2k
平均合并
16 小时 20 分钟
30 天内合并 PR
169

描述

### Description

```
### EVENT: DECOMPILER_FAIL
### Package:
### Binary: samples/windows/drivers/mup.sys
### Function: sub_1c0014420
### Execption:
Traceback (most recent call last):
File "/megatest/analyze_binary.py", line 27, in catcher
yield
File "/megatest/analyze_binary.py", line 141, in _doit_core
decompilation = elf.analyses.Decompiler(func, cfg=cfg)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/analysis.py", line 216, in __call__
r = w(*args, **kwargs)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/analysis.py", line 201, in wrapper
oself.__init__(*args, **kwargs)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/decompiler.py", line 95, in __init__
self._decompile()
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/decompiler.py", line 242, in _decompile
codegen = self.project.analyses.StructuredCodeGenerator(
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/analysis.py", line 216, in __call__
r = w(*args, **kwargs)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/analysis.py", line 201, in wrapper
oself.__init__(*args, **kwargs)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2342, in __init__
self._analyze()
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2381, in _analyze
obj = self._handle(self._sequence)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2875, in _handle
converted = handler(node, lvalue=lvalue)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2887, in _handle_Sequence
lines.append(self._handle(node, is_expr=False))
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2875, in _handle
converted = handler(node, lvalue=lvalue)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2979, in _handle_MultiNode
r = self._handle(n, is_expr=False)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2875, in _handle
converted = handler(node, lvalue=lvalue)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 3014, in _handle_AILBlock
cstmt = self._handle(stmt, is_expr=False)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2875, in _handle
converted = handler(node, lvalue=lvalue)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 3027, in _handle_Stmt_Store
cdata = self._handle(stmt.data)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2875, in _handle
converted = handler(node, lvalue=lvalue)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 3261, in _handle_Expr_Const
return self._access_constant_offset_reference(self._get_variable_reference(cvar), offset, None)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2552, in _access_constant_offset_reference
result = self._access_constant_offset(expr, offset, data_type or SimTypeBottom(), True)
File "/megatest/venv/lib/python3.10/site-packages/angr/analyses/decompiler/structured_codegen/c.py", line 2627, in _access_constant_offset
stride = base_type.size // self.project.arch.byte_width or 1
TypeError: unsupported operand type(s) for //: 'NotImplementedType' and 'int'
```

### Steps to reproduce the bug

_No response_

### Environment

angr environment report
=============================
Date: 2023-11-07 00:59:29.806968
Running in virtual environment at /megatest/venv
Platform: linux-x86_64
Python version: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
######## angr #########
Python found it in /megatest/venv/lib/python3.10/site-packages/angr
Pip version angr 9.2.76.dev0
Couldn't find git info
######## ailment #########
Python found it in /megatest/venv/lib/python3.10/site-packages/ailment
Pip version ailment 9.2.76.dev0
Couldn't find git info
######## cle #########
Python found it in /megatest/venv/lib/python3.10/site-packages/cle
Pip version cle 9.2.76.dev0
Couldn't find git info
######## pyvex #########
Python found it in /megatest/venv/lib/python3.10/site-packages/pyvex
Pip version pyvex 9.2.76.dev0
Couldn't find git info
######## claripy #########
Python found it in /megatest/venv/lib/python3.10/site-packages/claripy
Pip version claripy 9.2.76.dev0
Couldn't find git info
######## archinfo #########
Python found it in /megatest/venv/lib/python3.10/site-packages/archinfo
Pip version archinfo 9.2.76.dev0
Couldn't find git info
######## z3 #########
Python found it in /megatest/venv/lib/python3.10/site-packages/z3
Pip version z3-solver 4.10.2.0
Couldn't find git info
######## unicorn #########
Python found it in /megatest/venv/lib/python3.10/site-packages/unicorn
Pip version unicorn 2.0.1.post1
Couldn't find git info
######### Native Module Info ##########
angr:
unicorn:
pyvex: .FFILibrary object at 0x7f6dfaea52d0>
z3:

### Additional context

_No response_

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。