Hi,
I need to insert clean calls before and after each memory access, these clean calls also require me to reserve a register before the first call and unreserve it after.
The case in question is the following jmp qword ptr [0xADDRESS]. This means I CANNOT insert clean call or unreserve the register AFTER the instruction.
I thought of moving the second clean call and the unreservation to the beginning of the next BB (the jmp target), this would work well with the clean call insertion, but unreserving the register (or rather, not unreserving it in time) would give me this error:
ASSERT FAILURE: /home/travis/build/DynamoRIO/dynamorio/ext/drreg/drreg.c:649: !pt->reg[((reg)-DR_REG_RAX)].in_use (user failed to unreserve a register)
I had a similar situation with CALL instructions, but for calls I get to use R11 without reserving it because it is caller saved and is guaranteed to be "empty" by the time I instrument the call instruction.
How do I go about this? Is there a way to achieve what I am trying to do?