parseInstructions() doesn't always process the whole set of DWARF instructions for a frame. It will stop once the target PC is reached, or if malformed instructions are found. So, for example, if we have an instruction sequence like this:
<start> ... DW_CFA_remember_state ... DW_CFA_advance_loc past the location we're unwinding at (pcoffset in parseInstructions() main loop) ... DW_CFA_restore_state <end>
... the saved state will never be freed, even though the DW_CFA_remember_state opcode has a matching DW_CFA_restore_state later in the sequence.
This change adds code to free whatever is left on rememberStack after parsing the CIE and the FDE instructions.
Can you add a REQUIRES: x86 as well please? This shouldnt be executed on non-x86 platforms. I think that explicitly listing the triple is a good idea in the build rules (you could default to x86 builds which wont work with x86_64). I think that we *could* add a requirement on ASAN as well, but, that isn't as big of a concern.