[PATCH] D63841: [GWP-ASan] Add generic unwinders and structure backtrace output.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 15:14:31 PDT 2019


hctim added inline comments.


================
Comment at: compiler-rt/lib/gwp_asan/CMakeLists.txt:140
+      PARENT_TARGET gwp_asan)
+  endforeach()
 endif()
----------------
eugenis wrote:
> hctim wrote:
> > eugenis wrote:
> > > hctim wrote:
> > > > eugenis wrote:
> > > > > That's a lot of libraries. We need at most two - one standalone implementation for testing, and one "plugin" for the actual users.
> > > > The only problem here is that I'd expect people to mix-and-match these.
> > > > 
> > > > For example, Scudo is currently using the options parser, and the libc unwinder. Soon enough they'll be using the libc unwinder and providing their own options parser. I think we need to keep them decoupled to allow people to pick what they need (hence the `optional` dir).
> > > Right, but they don't need libclang_rt.* libraries. Those are for the driver to link with user binaries. Scudo would link RTGwpAsanxxxx statically.
> > > 
> > Ah, I see. Have removed the libclang_rt varaints for most of these and made a unified sanitizer_common-based support library.
> The library should be used in tests. Add at least a sanity test for stack trace printing.
I've added a sanity test for this. Slight caveat - we can't really link against `libclang_rt` runtimes without adding `-fsanitize=gwp_asan` to the clang driver (which is how ASan checks itself against `libclang_rt.ASan`), which I'd rather not do as this mostly for tests only. Instead, I link the unittests against `RTGwpAsan/RTGwpAsanOptionsParser/RTGwpAsanBacktraceSanitizerCommon` which should provide sufficient coverage and ensure that backtracing is correct for the sanitizer common variant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63841





More information about the llvm-commits mailing list