#include <cstdint>
#include <string>
#include <vector>
#include "partition_alloc/build_config.h"
#include "partition_alloc/partition_alloc_config.h"
#include "partition_alloc/partition_freelist_entry.h"
#include "partition_alloc/partition_page.h"
#include "partition_alloc/partition_root.h"
#include "partition_alloc/use_death_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
#if !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
namespace partition_alloc::internal {
namespace {
#if PA_USE_DEATH_TESTS() && PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY)
TEST(HardeningTest, PartialCorruption) { … }
TEST(HardeningTest, OffHeapPointerCrashing) { … }
TEST(HardeningTest, MetadataPointerCrashing) { … }
#endif
#if !PA_BUILDFLAG(IS_ANDROID)
TEST(HardeningTest, SuccessfulCorruption) { … }
#endif
#if PA_BUILDFLAG(USE_FREELIST_DISPATCHER)
#if PA_USE_DEATH_TESTS() && PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY)
TEST(HardeningTest, ConstructPoolOffsetFromStackPointerCrashing) { … }
TEST(HardeningTest, PoolOffsetMetadataPointerCrashing) { … }
#endif
#if !PA_BUILDFLAG(IS_ANDROID)
TEST(HardeningTest, PoolOffsetSuccessfulCorruption) { … }
#endif
#endif
}
}
#endif