DynamoRIO / DynamoRIO/dynamorio

dr_insert_clean_call creates non-encodable instruction

Open
#1,707 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

In 64-bit mode

```
dr_insert_clean_call(drcontext, ilist, where, (void *)clean_call_mem,
false, 3,
OPND_CREATE_INT32(write),
opnd_create_pc(instr_get_app_pc(where)),
opnd_create_reg(reg1));
```

the second operand creates

```
mov $0x00007ff7a71a3213 -> %rsi
```

which doesn't encode. The call to dr_insert_clean_call succeeds (i.e. doesn't assert) in debug mode. Subsequent attempts to encode or disassemble the instrumented block fail.

I guess it's expected that dr_insert_clean_call will insert only encodable instructions?

And surely this should encode in 64-bit mode, to 'movabs' (aka 'movabsq'), 0x48 0xbe ...

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.