llvm-project/libunwind
Jorge Gorbe Moya 1ae8d81147 [libunwind] Fix memory leak in handling of DW_CFA_remember_state and DW_CFA_restore_state
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.

Differential Revision: https://reviews.llvm.org/D66904
2020-02-18 11:57:18 -08:00
..
cmake [unwind] Don't link libpthread and libdl on Fuchsia 2019-12-17 17:21:43 -08:00
docs Bump the trunk major version to 11 2020-01-15 13:38:01 +01:00
include unwind: rename `__personality_routine` to `_Unwind_Personality_Fn` 2020-02-10 08:52:31 -08:00
src [libunwind] Fix memory leak in handling of DW_CFA_remember_state and DW_CFA_restore_state 2020-02-18 11:57:18 -08:00
test [libunwind] Fix memory leak in handling of DW_CFA_remember_state and DW_CFA_restore_state 2020-02-18 11:57:18 -08:00
.arcconfig [libunwind] Set up .arcconfig to point to new Diffusion UNW repository 2018-01-10 22:20:03 +00:00
.clang-format
CMakeLists.txt [libunwind] Fix building standalone after c48974ffd7 2020-01-26 22:12:40 +02:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00