tool-added jecxz;jmp_short;jmp messes up DR by triggering instr_is_cti_short_rewrite()
For #2820 (closed) I'm adding instrumentation that uses jecxz but can't always reach, so I used the landing pad pattern jecxz;jmp_short;jmp, but that fails to run and hits a DR assert:
$ clients/bin64/tool.drcacheoff.burst_threadfilter
pre-DR init
pre-DR start
<Application /home/bruening/dr/git/build_x64_dbg_tests/clients/bin64/tool.drcacheoff.burst_threadfilter (31150). Internal Error: DynamoRIO debug check failure: /home/bruening/dr/git/src/core/arch/interp.c:7488 false
(Error occurred @82 frags)
version 6.2.17567, custom build
-client_lib ';;-offline -max_trace_size 256K' -stderr_mask 12 -stack_size 56K -signal_stack_size 32K -max_elide_jmp 0 -max_elide_call 0 -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct >
It matches instr_is_cti_short_rewrite() and confuses DR.
For now I'm putting a nop after the jmp_short which won't be executed but is a waste of space.