dr_insert_clean_call creates non-encodable instruction
Created by: algr
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 ...