DynamoRIO / DynamoRIO/dynamorio
encode state for IT block may have a dangling instruction pointer
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
encode_state_t is a data structure to keep extra state information for encoding instructions in an IT block.
encode_state_t has an instr pointer pointing to the current or next instruction in the IT block. However, it is possible that someone delete/replace that instruction, which causes encode_state_t has a dangling pointer.
There might be several ways to avoid that problem:
1. at every instr_destroy(), check the encode_state_t. This may cause performance problem, and may need to check both current thread dcontext and the global dcontext.
2. add encode_state_t at beginning of any instruction list encode. The problem is the user may encode instr by instr without using instrlist_encode.
Currently we implement 2.
Contributor guide
Assessment
This issue has not been assessed yet.