[GWP-ASan] Integration with Scudo [5].
authorMitch Phillips <mitchphillips@outlook.com>
Mon, 17 Jun 2019 17:45:34 +0000 (17:45 +0000)
committerMitch Phillips <mitchphillips@outlook.com>
Mon, 17 Jun 2019 17:45:34 +0000 (17:45 +0000)
commit21184ec5c48c4a7a108ef8143080fa36c833b8c3
tree316450bc3f61d320019ba8bce6bd610141e0c897
parent0cbf37af1e99149cce5413382878be26d534782a
[GWP-ASan] Integration with Scudo [5].

Summary:
See D60593 for further information.

This patch adds GWP-ASan support to the Scudo hardened allocator. It also
implements end-to-end integration tests using Scudo as the backing allocator.
The tests include crash handling for buffer over/underflow as well as
use-after-free detection.

Reviewers: vlad.tsyrklevich, cryptoad

Reviewed By: vlad.tsyrklevich, cryptoad

Subscribers: kubamracek, mgorny, #sanitizers, llvm-commits, morehouse

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D62929

llvm-svn: 363584
21 files changed:
compiler-rt/lib/scudo/CMakeLists.txt
compiler-rt/lib/scudo/scudo_allocator.cpp
compiler-rt/test/gwp_asan/CMakeLists.txt
compiler-rt/test/gwp_asan/double_delete.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/double_deletea.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/double_free.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/dummy_test.cc [deleted file]
compiler-rt/test/gwp_asan/heap_buffer_overflow.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/heap_buffer_underflow.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/invalid_free_left.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/invalid_free_right.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/lit.cfg
compiler-rt/test/gwp_asan/page_size.h [new file with mode: 0644]
compiler-rt/test/gwp_asan/realloc.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/repeated_alloc.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/use_after_delete.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/use_after_deletea.cpp [new file with mode: 0644]
compiler-rt/test/gwp_asan/use_after_free.cpp [new file with mode: 0644]
compiler-rt/test/lit.common.cfg
compiler-rt/test/lit.common.configured.in
compiler-rt/test/scudo/lit.cfg