DynamoRIO / DynamoRIO/dynamorio

encode state for IT block may have a dangling instruction pointer

Open
#1,734 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.