[UCRT:VCRUNTIME] Implement __report_gsfailure()

This commit is contained in:
Timo Kreuzer 2025-01-17 11:42:45 +02:00
parent 5dcd1d1714
commit b0f3e623b7
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,21 @@
//
// __report_gsfailure.c
//
// Copyright (c) 2024 Timo Kreuzer
//
// Implementation of __report_gsfailure.
//
// SPDX-License-Identifier: MIT
//
#include <intrin.h>
#include <ntrtl.h>
#if defined(_M_IX86)
__declspec(noreturn) void __cdecl __report_gsfailure(void)
#else
__declspec(noreturn) void __cdecl __report_gsfailure(_In_ uintptr_t _StackCookie)
#endif
{
__fastfail(FAST_FAIL_STACK_COOKIE_CHECK_FAILURE);
}

View file

@ -1,5 +1,6 @@
list(APPEND UCRT_VCRUNTIME_SOURCES
vcruntime/__report_gsfailure.c
vcruntime/__security_init_cookie.c
)