Enable heap-less IR data structures
DR's IR data structures were designed to have a small size footprint in the average case for DR's mode of controlling an application without any tool attached. In that mode, DR does not bother to fully decode all operands of most instructions, caring only about branches and other instructions that need mangling. A key use case of DR early on was running dozens of 32-bit applications simultaneously, where some of these apps were quite large and took the entire address space, leaving DR to operate within a bounded reservation. Thus, instr_t
was designed to only have room for one source built-in (all you need for most branches).
However, today's typical use case is with a tool attached, where DR does decode all the operands for every single instruction. Plus, most uses are 64-bit, where space is not as critical, and running a single application at a time. Even more importantly, for the drdecode
decoding/encoding library that DR exports, it is best to not use any heap to allow use within signal handlers and other fragile locations.
This is a feature request to either change the default instr_t
layout or have a method of creating an instr_t
that does not use any heap.