[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
2019-06-06 03:42:48 +08:00
|
|
|
//===-- guarded_pool_allocator.h --------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef GWP_ASAN_GUARDED_POOL_ALLOCATOR_H_
|
|
|
|
#define GWP_ASAN_GUARDED_POOL_ALLOCATOR_H_
|
|
|
|
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
#include "gwp_asan/common.h"
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
#include "gwp_asan/definitions.h"
|
|
|
|
#include "gwp_asan/mutex.h"
|
|
|
|
#include "gwp_asan/options.h"
|
2019-08-16 05:09:09 +08:00
|
|
|
#include "gwp_asan/stack_trace_compressor.h"
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
namespace gwp_asan {
|
|
|
|
// This class is the primary implementation of the allocator portion of GWP-
|
|
|
|
// ASan. It is the sole owner of the pool of sequentially allocated guarded
|
|
|
|
// slots. It should always be treated as a singleton.
|
|
|
|
|
|
|
|
// Functions in the public interface of this class are thread-compatible until
|
|
|
|
// init() is called, at which point they become thread-safe (unless specified
|
|
|
|
// otherwise).
|
|
|
|
class GuardedPoolAllocator {
|
|
|
|
public:
|
2020-01-25 07:01:47 +08:00
|
|
|
// Name of the GWP-ASan mapping that for `Metadata`.
|
|
|
|
static constexpr const char *kGwpAsanMetadataName = "GWP-ASan Metadata";
|
|
|
|
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
// During program startup, we must ensure that memory allocations do not land
|
|
|
|
// in this allocation pool if the allocator decides to runtime-disable
|
|
|
|
// GWP-ASan. The constructor value-initialises the class such that if no
|
|
|
|
// further initialisation takes place, calls to shouldSample() and
|
|
|
|
// pointerIsMine() will return false.
|
2020-10-20 02:54:43 +08:00
|
|
|
constexpr GuardedPoolAllocator() {}
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
GuardedPoolAllocator(const GuardedPoolAllocator &) = delete;
|
|
|
|
GuardedPoolAllocator &operator=(const GuardedPoolAllocator &) = delete;
|
|
|
|
|
|
|
|
// Note: This class is expected to be a singleton for the lifetime of the
|
|
|
|
// program. If this object is initialised, it will leak the guarded page pool
|
|
|
|
// and metadata allocations during destruction. We can't clean up these areas
|
|
|
|
// as this may cause a use-after-free on shutdown.
|
|
|
|
~GuardedPoolAllocator() = default;
|
|
|
|
|
|
|
|
// Initialise the rest of the members of this class. Create the allocation
|
|
|
|
// pool using the provided options. See options.inc for runtime configuration
|
|
|
|
// options.
|
|
|
|
void init(const options::Options &Opts);
|
2020-01-11 08:01:01 +08:00
|
|
|
void uninitTestOnly();
|
|
|
|
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
// Functions exported for libmemunreachable's use on Android. disable()
|
|
|
|
// installs a lock in the allocator that prevents any thread from being able
|
|
|
|
// to allocate memory, until enable() is called.
|
2020-01-11 08:01:01 +08:00
|
|
|
void disable();
|
|
|
|
void enable();
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
|
2020-01-24 08:12:15 +08:00
|
|
|
typedef void (*iterate_callback)(uintptr_t base, size_t size, void *arg);
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
// Execute the callback Cb for every allocation the lies in [Base, Base +
|
|
|
|
// Size). Must be called while the allocator is disabled. The callback can not
|
2020-01-24 08:12:15 +08:00
|
|
|
// allocate.
|
|
|
|
void iterate(void *Base, size_t Size, iterate_callback Cb, void *Arg);
|
|
|
|
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
// This function is used to signal the allocator to indefinitely stop
|
|
|
|
// functioning, as a crash has occurred. This stops the allocator from
|
|
|
|
// servicing any further allocations permanently.
|
|
|
|
void stop();
|
|
|
|
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
// Return whether the allocation should be randomly chosen for sampling.
|
2019-11-26 04:25:43 +08:00
|
|
|
GWP_ASAN_ALWAYS_INLINE bool shouldSample() {
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
// NextSampleCounter == 0 means we "should regenerate the counter".
|
|
|
|
// == 1 means we "should sample this allocation".
|
2020-01-11 08:01:01 +08:00
|
|
|
// AdjustedSampleRatePlusOne is designed to intentionally underflow. This
|
|
|
|
// class must be valid when zero-initialised, and we wish to sample as
|
|
|
|
// infrequently as possible when this is the case, hence we underflow to
|
|
|
|
// UINT32_MAX.
|
2019-11-26 04:25:43 +08:00
|
|
|
if (GWP_ASAN_UNLIKELY(ThreadLocals.NextSampleCounter == 0))
|
[GWP-ASan] Guard against recursive allocs. Pack TLS for perf.
Summary:
Add a recursivity guard for GPA::allocate(). This means that any
recursive allocations will fall back to the supporting allocator. In future
patches, we will introduce stack trace collection support. The unwinder will be
provided by the supporting allocator, and we can't guarantee they don't call
malloc() (e.g. backtrace() on posix may call dlopen(), which may call malloc().
Furthermore, this patch packs the new TLS recursivity guard into a thread local
struct, so that TLS variables should be hopefully not fall across cache lines.
Reviewers: vlad.tsyrklevich, morehouse, eugenis
Reviewed By: eugenis
Subscribers: kubamracek, #sanitizers, llvm-commits, eugenis
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D63736
llvm-svn: 364356
2019-06-26 06:29:05 +08:00
|
|
|
ThreadLocals.NextSampleCounter =
|
2020-10-23 04:40:12 +08:00
|
|
|
((getRandomUnsigned32() % (AdjustedSampleRatePlusOne - 1)) + 1) &
|
|
|
|
ThreadLocalPackedVariables::NextSampleCounterMask;
|
[GWP-ASan] Guard against recursive allocs. Pack TLS for perf.
Summary:
Add a recursivity guard for GPA::allocate(). This means that any
recursive allocations will fall back to the supporting allocator. In future
patches, we will introduce stack trace collection support. The unwinder will be
provided by the supporting allocator, and we can't guarantee they don't call
malloc() (e.g. backtrace() on posix may call dlopen(), which may call malloc().
Furthermore, this patch packs the new TLS recursivity guard into a thread local
struct, so that TLS variables should be hopefully not fall across cache lines.
Reviewers: vlad.tsyrklevich, morehouse, eugenis
Reviewed By: eugenis
Subscribers: kubamracek, #sanitizers, llvm-commits, eugenis
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D63736
llvm-svn: 364356
2019-06-26 06:29:05 +08:00
|
|
|
|
2019-11-26 04:25:43 +08:00
|
|
|
return GWP_ASAN_UNLIKELY(--ThreadLocals.NextSampleCounter == 0);
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Returns whether the provided pointer is a current sampled allocation that
|
|
|
|
// is owned by this pool.
|
2019-11-26 04:25:43 +08:00
|
|
|
GWP_ASAN_ALWAYS_INLINE bool pointerIsMine(const void *Ptr) const {
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
return State.pointerIsMine(Ptr);
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Allocate memory in a guarded slot, and return a pointer to the new
|
|
|
|
// allocation. Returns nullptr if the pool is empty, the requested size is too
|
|
|
|
// large for this pool to handle, or the requested size is zero.
|
|
|
|
void *allocate(size_t Size);
|
|
|
|
|
|
|
|
// Deallocate memory in a guarded slot. The provided pointer must have been
|
|
|
|
// allocated using this pool. This will set the guarded slot as inaccessible.
|
|
|
|
void deallocate(void *Ptr);
|
|
|
|
|
|
|
|
// Returns the size of the allocation at Ptr.
|
|
|
|
size_t getSize(const void *Ptr);
|
|
|
|
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
// Returns a pointer to the Metadata region, or nullptr if it doesn't exist.
|
|
|
|
const AllocationMetadata *getMetadataRegion() const { return Metadata; }
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
// Returns a pointer to the AllocatorState region.
|
|
|
|
const AllocatorState *getAllocatorState() const { return &State; }
|
2019-07-17 04:06:17 +08:00
|
|
|
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
private:
|
2020-01-25 07:01:47 +08:00
|
|
|
// Name of actively-occupied slot mappings.
|
|
|
|
static constexpr const char *kGwpAsanAliveSlotName = "GWP-ASan Alive Slot";
|
|
|
|
// Name of the guard pages. This includes all slots that are not actively in
|
|
|
|
// use (i.e. were never used, or have been free()'d).)
|
|
|
|
static constexpr const char *kGwpAsanGuardPageName = "GWP-ASan Guard Page";
|
|
|
|
// Name of the mapping for `FreeSlots`.
|
|
|
|
static constexpr const char *kGwpAsanFreeSlotsName = "GWP-ASan Metadata";
|
|
|
|
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
static constexpr size_t kInvalidSlotID = SIZE_MAX;
|
|
|
|
|
|
|
|
// These functions anonymously map memory or change the permissions of mapped
|
|
|
|
// memory into this process in a platform-specific way. Pointer and size
|
|
|
|
// arguments are expected to be page-aligned. These functions will never
|
|
|
|
// return on error, instead electing to kill the calling process on failure.
|
|
|
|
// Note that memory is initially mapped inaccessible. In order for RW
|
|
|
|
// mappings, call mapMemory() followed by markReadWrite() on the returned
|
2020-01-25 07:01:47 +08:00
|
|
|
// pointer. Each mapping is named on platforms that support it, primarily
|
|
|
|
// Android. This name must be a statically allocated string, as the Android
|
|
|
|
// kernel uses the string pointer directly.
|
|
|
|
void *mapMemory(size_t Size, const char *Name) const;
|
|
|
|
void unmapMemory(void *Ptr, size_t Size, const char *Name) const;
|
|
|
|
void markReadWrite(void *Ptr, size_t Size, const char *Name) const;
|
|
|
|
void markInaccessible(void *Ptr, size_t Size, const char *Name) const;
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
|
|
|
|
// Get the page size from the platform-specific implementation. Only needs to
|
|
|
|
// be called once, and the result should be cached in PageSize in this class.
|
|
|
|
static size_t getPlatformPageSize();
|
|
|
|
|
|
|
|
// Returns a pointer to the metadata for the owned pointer. If the pointer is
|
|
|
|
// not owned by this pool, the result is undefined.
|
|
|
|
AllocationMetadata *addrToMetadata(uintptr_t Ptr) const;
|
|
|
|
|
|
|
|
// Reserve a slot for a new guarded allocation. Returns kInvalidSlotID if no
|
|
|
|
// slot is available to be reserved.
|
|
|
|
size_t reserveSlot();
|
|
|
|
|
|
|
|
// Unreserve the guarded slot.
|
|
|
|
void freeSlot(size_t SlotIndex);
|
|
|
|
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
// Raise a SEGV and set the corresponding fields in the Allocator's State in
|
|
|
|
// order to tell the crash handler what happened. Used when errors are
|
|
|
|
// detected internally (Double Free, Invalid Free).
|
|
|
|
void trapOnAddress(uintptr_t Address, Error E);
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
|
2020-01-11 08:01:01 +08:00
|
|
|
static GuardedPoolAllocator *getSingleton();
|
|
|
|
|
|
|
|
// Install a pthread_atfork handler.
|
|
|
|
void installAtFork();
|
|
|
|
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
gwp_asan::AllocatorState State;
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
|
|
|
|
// A mutex to protect the guarded slot and metadata pool for this class.
|
|
|
|
Mutex PoolMutex;
|
|
|
|
// Record the number allocations that we've sampled. We store this amount so
|
|
|
|
// that we don't randomly choose to recycle a slot that previously had an
|
|
|
|
// allocation before all the slots have been utilised.
|
|
|
|
size_t NumSampledAllocations = 0;
|
|
|
|
// Pointer to the allocation metadata (allocation/deallocation stack traces),
|
|
|
|
// if any.
|
|
|
|
AllocationMetadata *Metadata = nullptr;
|
|
|
|
|
|
|
|
// Pointer to an array of free slot indexes.
|
|
|
|
size_t *FreeSlots = nullptr;
|
|
|
|
// The current length of the list of free slots.
|
|
|
|
size_t FreeSlotsLength = 0;
|
|
|
|
|
|
|
|
// See options.{h, inc} for more information.
|
|
|
|
bool PerfectlyRightAlign = false;
|
|
|
|
|
[GWP-ASan] Crash Handler API.
Summary:
Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch:
1. Introduces the crash handler API (crash_handler_api.h).
2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct).
3. Implements the crash handler API using the AllocatorState and Metadata.
4. Adds tests for the crash handler.
5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API.
6. Minor updates Scudo & Scudo Standalone to fix compatibility.
7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
2020-02-06 07:39:03 +08:00
|
|
|
// Backtrace function provided by the supporting allocator. See `options.h`
|
|
|
|
// for more information.
|
[GWP-ASan] Add generic unwinders and structure backtrace output.
Summary:
Adds two flavours of generic unwinder and all the supporting cruft. If the
supporting allocator is okay with bringing in sanitizer_common, they can use
the fast frame-pointer based unwinder from sanitizer_common. Otherwise, we also
provide the backtrace() libc-based unwinder as well. Of course, the allocator
can always specify its own unwinder and unwinder-symbolizer.
The slightly changed output format is exemplified in the first comment on this
patch. It now better incorporates backtrace information, and displays
allocation details on the second line.
Reviewers: eugenis, vlad.tsyrklevich
Reviewed By: eugenis, vlad.tsyrklevich
Subscribers: srhines, kubamracek, mgorny, cryptoad, #sanitizers, llvm-commits, morehouse
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D63841
llvm-svn: 364941
2019-07-03 00:04:52 +08:00
|
|
|
options::Backtrace_t Backtrace = nullptr;
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
|
|
|
|
// The adjusted sample rate for allocation sampling. Default *must* be
|
|
|
|
// nonzero, as dynamic initialisation may call malloc (e.g. from libstdc++)
|
|
|
|
// before GPA::init() is called. This would cause an error in shouldSample(),
|
|
|
|
// where we would calculate modulo zero. This value is set UINT32_MAX, as when
|
|
|
|
// GWP-ASan is disabled, we wish to never spend wasted cycles recalculating
|
|
|
|
// the sample rate.
|
2020-01-11 08:01:01 +08:00
|
|
|
uint32_t AdjustedSampleRatePlusOne = 0;
|
[GWP-ASan] Guard against recursive allocs. Pack TLS for perf.
Summary:
Add a recursivity guard for GPA::allocate(). This means that any
recursive allocations will fall back to the supporting allocator. In future
patches, we will introduce stack trace collection support. The unwinder will be
provided by the supporting allocator, and we can't guarantee they don't call
malloc() (e.g. backtrace() on posix may call dlopen(), which may call malloc().
Furthermore, this patch packs the new TLS recursivity guard into a thread local
struct, so that TLS variables should be hopefully not fall across cache lines.
Reviewers: vlad.tsyrklevich, morehouse, eugenis
Reviewed By: eugenis
Subscribers: kubamracek, #sanitizers, llvm-commits, eugenis
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D63736
llvm-svn: 364356
2019-06-26 06:29:05 +08:00
|
|
|
|
|
|
|
// Pack the thread local variables into a struct to ensure that they're in
|
|
|
|
// the same cache line for performance reasons. These are the most touched
|
|
|
|
// variables in GWP-ASan.
|
|
|
|
struct alignas(8) ThreadLocalPackedVariables {
|
2020-10-23 04:40:12 +08:00
|
|
|
constexpr ThreadLocalPackedVariables()
|
|
|
|
: RandomState(0xff82eb50), NextSampleCounter(0), RecursiveGuard(false) {
|
|
|
|
}
|
|
|
|
// Initialised to a magic constant so that an uninitialised GWP-ASan won't
|
|
|
|
// regenerate its sample counter for as long as possible. The xorshift32()
|
|
|
|
// algorithm used below results in getRandomUnsigned32(0xff82eb50) ==
|
|
|
|
// 0xfffffea4.
|
|
|
|
uint32_t RandomState;
|
[GWP-ASan] Guard against recursive allocs. Pack TLS for perf.
Summary:
Add a recursivity guard for GPA::allocate(). This means that any
recursive allocations will fall back to the supporting allocator. In future
patches, we will introduce stack trace collection support. The unwinder will be
provided by the supporting allocator, and we can't guarantee they don't call
malloc() (e.g. backtrace() on posix may call dlopen(), which may call malloc().
Furthermore, this patch packs the new TLS recursivity guard into a thread local
struct, so that TLS variables should be hopefully not fall across cache lines.
Reviewers: vlad.tsyrklevich, morehouse, eugenis
Reviewed By: eugenis
Subscribers: kubamracek, #sanitizers, llvm-commits, eugenis
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D63736
llvm-svn: 364356
2019-06-26 06:29:05 +08:00
|
|
|
// Thread-local decrementing counter that indicates that a given allocation
|
|
|
|
// should be sampled when it reaches zero.
|
2020-10-23 04:40:12 +08:00
|
|
|
uint32_t NextSampleCounter : 31;
|
|
|
|
// The mask is needed to silence conversion errors.
|
|
|
|
static const uint32_t NextSampleCounterMask = (1U << 31) - 1;
|
[GWP-ASan] Guard against recursive allocs. Pack TLS for perf.
Summary:
Add a recursivity guard for GPA::allocate(). This means that any
recursive allocations will fall back to the supporting allocator. In future
patches, we will introduce stack trace collection support. The unwinder will be
provided by the supporting allocator, and we can't guarantee they don't call
malloc() (e.g. backtrace() on posix may call dlopen(), which may call malloc().
Furthermore, this patch packs the new TLS recursivity guard into a thread local
struct, so that TLS variables should be hopefully not fall across cache lines.
Reviewers: vlad.tsyrklevich, morehouse, eugenis
Reviewed By: eugenis
Subscribers: kubamracek, #sanitizers, llvm-commits, eugenis
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D63736
llvm-svn: 364356
2019-06-26 06:29:05 +08:00
|
|
|
// Guard against recursivity. Unwinders often contain complex behaviour that
|
|
|
|
// may not be safe for the allocator (i.e. the unwinder calls dlopen(),
|
|
|
|
// which calls malloc()). When recursive behaviour is detected, we will
|
|
|
|
// automatically fall back to the supporting allocator to supply the
|
|
|
|
// allocation.
|
2020-10-23 04:40:12 +08:00
|
|
|
bool RecursiveGuard : 1;
|
[GWP-ASan] Guard against recursive allocs. Pack TLS for perf.
Summary:
Add a recursivity guard for GPA::allocate(). This means that any
recursive allocations will fall back to the supporting allocator. In future
patches, we will introduce stack trace collection support. The unwinder will be
provided by the supporting allocator, and we can't guarantee they don't call
malloc() (e.g. backtrace() on posix may call dlopen(), which may call malloc().
Furthermore, this patch packs the new TLS recursivity guard into a thread local
struct, so that TLS variables should be hopefully not fall across cache lines.
Reviewers: vlad.tsyrklevich, morehouse, eugenis
Reviewed By: eugenis
Subscribers: kubamracek, #sanitizers, llvm-commits, eugenis
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D63736
llvm-svn: 364356
2019-06-26 06:29:05 +08:00
|
|
|
};
|
2020-10-23 04:40:12 +08:00
|
|
|
static_assert(sizeof(ThreadLocalPackedVariables) == sizeof(uint64_t),
|
|
|
|
"thread local data does not fit in a uint64_t");
|
|
|
|
|
|
|
|
class ScopedRecursiveGuard {
|
|
|
|
public:
|
|
|
|
ScopedRecursiveGuard() { ThreadLocals.RecursiveGuard = true; }
|
|
|
|
~ScopedRecursiveGuard() { ThreadLocals.RecursiveGuard = false; }
|
|
|
|
};
|
|
|
|
|
|
|
|
// Initialise the PRNG, platform-specific.
|
|
|
|
void initPRNG();
|
|
|
|
|
|
|
|
// xorshift (32-bit output), extremely fast PRNG that uses arithmetic
|
|
|
|
// operations only. Seeded using platform-specific mechanisms by initPRNG().
|
|
|
|
uint32_t getRandomUnsigned32();
|
|
|
|
|
2019-11-26 04:25:43 +08:00
|
|
|
static GWP_ASAN_TLS_INITIAL_EXEC ThreadLocalPackedVariables ThreadLocals;
|
[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
2019-06-06 03:42:48 +08:00
|
|
|
};
|
|
|
|
} // namespace gwp_asan
|
|
|
|
|
|
|
|
#endif // GWP_ASAN_GUARDED_POOL_ALLOCATOR_H_
|