#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/gwp_asan/client/lightweight_detector/poison_metadata_recorder.h"
#include <algorithm>
#include <random>
#include "base/strings/stringprintf.h"
#include "components/gwp_asan/client/thread_local_random_bit_generator.h"
#include "components/gwp_asan/common/allocation_info.h"
#include "components/gwp_asan/common/pack_stack_trace.h"
#if BUILDFLAG(IS_ANDROID)
#include "components/crash/core/app/crashpad.h"
#endif
namespace gwp_asan::internal::lud {
PoisonMetadataRecorder::PoisonMetadataRecorder(LightweightDetectorMode mode,
size_t num_metadata) { … }
PoisonMetadataRecorder::~PoisonMetadataRecorder() = default;
void PoisonMetadataRecorder::RecordAndZap(void* ptr, size_t size) { … }
std::string PoisonMetadataRecorder::GetCrashKey() const { … }
std::vector<std::pair<void*, size_t>>
PoisonMetadataRecorder::GetInternalMemoryRegions() { … }
bool PoisonMetadataRecorder::HasAllocationForTesting(uintptr_t address) { … }
template class EXPORT_TEMPLATE_DEFINE(GWP_ASAN_EXPORT)
SharedStateHolder<PoisonMetadataRecorder>;
}