[GWP-ASan] Split the unwinder into segv/non-segv.
authorMitch Phillips <31459023+hctim@users.noreply.github.com>
Tue, 21 Jul 2020 15:19:02 +0000 (08:19 -0700)
committerMitch Phillips <31459023+hctim@users.noreply.github.com>
Tue, 21 Jul 2020 15:25:37 +0000 (08:25 -0700)
commit4f029d1be4e19270416637327f56668744e64b5c
treef9e9479f8ef938ddc0f14ed619c718e52b4f141f
parent9bacf1588583014538a0217add18f370acb95788
[GWP-ASan] Split the unwinder into segv/non-segv.

Note: Resubmission with frame pointers force-enabled to fix builds with
-DCOMPILER_RT_BUILD_BUILTINS=False

Summary:
Splits the unwinder into a non-segv (for allocation/deallocation traces) and a
segv unwinder. This ensures that implementations can select an accurate, slower
unwinder in the segv handler (if they choose to use the GWP-ASan provided one).
This is important as fast frame-pointer unwinders (like the sanitizer unwinder)
don't like unwinding through signal handlers.

Reviewers: morehouse, cryptoad

Reviewed By: morehouse, cryptoad

Subscribers: cryptoad, mgorny, eugenis, pcc, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D83994
compiler-rt/lib/gwp_asan/CMakeLists.txt
compiler-rt/lib/gwp_asan/optional/backtrace_linux_libc.cpp
compiler-rt/lib/gwp_asan/optional/backtrace_sanitizer_common.cpp
compiler-rt/lib/gwp_asan/optional/segv_handler.h
compiler-rt/lib/gwp_asan/optional/segv_handler_posix.cpp
compiler-rt/lib/gwp_asan/tests/CMakeLists.txt
compiler-rt/lib/gwp_asan/tests/harness.h
compiler-rt/lib/scudo/scudo_allocator.cpp
compiler-rt/lib/scudo/standalone/combined.h
compiler-rt/test/gwp_asan/backtrace.c [new file with mode: 0644]