DynamoRIO / DynamoRIO/dynamorio
Exceed short jump length error happens when inserting clean call in simulation code region of rep instructions
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 30
Description
**Describe the bug**
After invoking code _drutil_expand_rep_string()_ in analysis function in intrumentation phase 2, then, I insert clean call to monitor instructions in the simuation code region of rep string instructions, some 'exceed short jump length' errors will happen on Windows.
I understand why the error will happen, as _drutil_expand_rep_string()_ happen in phase 2, and in that phase, all blocks must endwith a long jump or a syscall, thus, _drutil_expand_rep_string()_ can only use short jump instruction **loop** to simulate the original instruction.
But when inserting clean call to every instruction in the simuation code region, it will obviously lead to 'exceed short jump length' error.
As the author of DynamoRIO mentioned in [#6220](https://github.com/DynamoRIO/dynamorio/issues/6220#issue-1815203007), it is a bug which needs to be solved, so I post here as a bug.
Contributor guide
Assessment
This issue has not been assessed yet.