chromium/components/gwp_asan/client/lightweight_detector/poison_metadata_recorder.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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"  // nogncheck
#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>;

}  // namespace gwp_asan::internal::lud