// 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. #ifndef COMPONENTS_GWP_ASAN_COMMON_LIGHTWEIGHT_DETECTOR_STATE_H_ #define COMPONENTS_GWP_ASAN_COMMON_LIGHTWEIGHT_DETECTOR_STATE_H_ #include <stdint.h> #include <optional> #include "components/gwp_asan/common/allocation_info.h" namespace gwp_asan::internal { // This enum is used during GWP-ASan initialization to control the // Lightweight UAF Detector. enum class LightweightDetectorMode : uint8_t { … }; // Encapsulates Lightweight UAF Detector's state shared with with the crash // handler process. class LightweightDetectorState { … }; // Ensure that the detector state is a plain-old-data. That way we can safely // initialize it by copying memory from out-of-process without worrying about // destructors operating on the fields in an unexpected way. static_assert …; static_assert …; } // namespace gwp_asan::internal #endif // COMPONENTS_GWP_ASAN_COMMON_LIGHTWEIGHT_DETECTOR_STATE_H_