Avi Drissman | e4622aa | 2022-09-08 20:36:06 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors |
Will Harris | eb4a6ff | 2018-07-25 18:36:52 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef BASE_DEBUG_INVALID_ACCESS_WIN_H_ |
| 6 | #define BASE_DEBUG_INVALID_ACCESS_WIN_H_ |
| 7 | |
| 8 | #include "base/base_export.h" |
| 9 | |
| 10 | namespace base { |
| 11 | namespace debug { |
| 12 | namespace win { |
| 13 | |
| 14 | // Creates a synthetic heap corruption that causes the current process to |
| 15 | // terminate immediately with a fast fail exception. |
| 16 | [[noreturn]] BASE_EXPORT void TerminateWithHeapCorruption(); |
| 17 | |
Will Harris | c218db23 | 2020-07-21 20:20:57 | [diff] [blame] | 18 | // Creates a CFG violation. |
| 19 | [[noreturn]] BASE_EXPORT void TerminateWithControlFlowViolation(); |
| 20 | |
Will Harris | eb4a6ff | 2018-07-25 18:36:52 | [diff] [blame] | 21 | } // namespace win |
| 22 | } // namespace debug |
| 23 | } // namespace base |
| 24 | |
| 25 | #endif // BASE_DEBUG_INVALID_ACCESS_WIN_H_ |