[GWP-ASan] Core Guarded Pool Allocator [4].
authorMitch Phillips <mitchphillips@outlook.com>
Wed, 5 Jun 2019 19:42:48 +0000 (19:42 +0000)
committerMitch Phillips <mitchphillips@outlook.com>
Wed, 5 Jun 2019 19:42:48 +0000 (19:42 +0000)
commita95edb9dc1ddaf70761e8c90be175f144a28f757
tree761ec281cfe5593c2aebb5a9c0bb8bfca65ce115
parent036fa5346f2d2f2432e1c70242f17c270e040fc6
[GWP-ASan] Core Guarded Pool Allocator [4].

Summary:
See D60593 for further information.

This patch introduces the core of GWP-ASan, being the guarded pool allocator. This class contains the logic for creating and maintaining allocations in the guarded pool. Its public interface is to be utilised by supporting allocators in order to provide sampled guarded allocation behaviour.

This patch also contains basic functionality tests of the allocator as unittests. The error-catching behaviour will be tested in upcoming patches that use Scudo as an implementing allocator.

Reviewers: vlad.tsyrklevich, eugenis, jfb

Reviewed By: vlad.tsyrklevich

Subscribers: dexonsmith, kubamracek, mgorny, cryptoad, jfb, #sanitizers, llvm-commits, morehouse

Tags: #sanitizers, #llvm

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

llvm-svn: 362636
compiler-rt/lib/gwp_asan/CMakeLists.txt
compiler-rt/lib/gwp_asan/definitions.h [new file with mode: 0644]
compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp [new file with mode: 0644]
compiler-rt/lib/gwp_asan/guarded_pool_allocator.h [new file with mode: 0644]
compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp [new file with mode: 0644]
compiler-rt/lib/gwp_asan/tests/CMakeLists.txt
compiler-rt/lib/gwp_asan/tests/alignment.cpp [new file with mode: 0644]
compiler-rt/lib/gwp_asan/tests/basic.cpp [new file with mode: 0644]
compiler-rt/lib/gwp_asan/tests/harness.h [new file with mode: 0644]
compiler-rt/lib/gwp_asan/tests/slot_reuse.cpp [new file with mode: 0644]
compiler-rt/lib/gwp_asan/tests/thread_contention.cpp [new file with mode: 0644]