angr / angr/angr-management

Side effect on decompilation when instructions are hooked

Open
#869 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
1.2k
Forks
131
Avg merge
1d 11h
Merged PRs (30d)
14

Description

### Description

I'm not quite sure if it's designed or an actual bug. Here's the case:

when call instructions is hooked,
![image](https://user-images.githubusercontent.com/31790712/211484398-fc98b4d9-594b-45ae-9f7b-6b2410e45f95.png)
![image](https://user-images.githubusercontent.com/31790712/211485674-a3a3f654-1778-4368-8e81-d77a649801e1.png)

and re-decompilation is trigered (say, when decompilation options is toggled)
![image](https://user-images.githubusercontent.com/31790712/211485109-5e2128ad-d0b2-4fe6-9fba-9af35ba62457.png)

Hooked code is missing in decompilation result. the `printf()` disappears

### Steps to reproduce the bug

Open any binary to hook a function call instruction, decompile or re-decompile the function

### Environment

angr 9.2.33

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.