[libcxx-commits] [PATCH] D66904: [libunwind] Fix memory leak in handling of DW_CFA_remember_state and DW_CFA_restore_state

David Blaikie via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 30 16:51:22 PDT 2019


dblaikie added a comment.

In D66904#1653092 <https://reviews.llvm.org/D66904#1653092>, @jgorbe wrote:

> Looking into how to add a test now. I'm not familiar at all with libunwind code, so I have no idea how to cause this leak to happen from the outside (and then the test would only work when running under asan). Any pointers would be much appreciated.


It looks like libunwind is fairly undertested by my estimate - but it does have test files that are, by the looks of it, compiled and run and expected to exit 0? (the .cpp files in the libunwind/test directory)

So you might be able to test this by adding a test file that has a hardcoded assembly eh_frame (if you can use "REQUIRES" to limit it to only run on platforms where your assembly is appropriate) & if the test would only fail with sanitizers, that's OK (and you might be able to make the test only run with sanitizers with another REQUIRES entry - I'd suggest checking llvm tests to see if any of them have/support/use a filter on sanitizers - but that'd just speed up things on non-sanitizer builds, given how few tests are here that's hardly likely to be a critical problem).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66904/new/

https://reviews.llvm.org/D66904





More information about the libcxx-commits mailing list