0fc725c6e50ef3cd140646de21224f87de805318
3 /*********************************************************************
6 * Trap to a debugger if the value of the stack pointer has changed.
15 * This function is available for iX86 only.
17 * When VC++ generates debug code, it stores the value of the stack pointer
18 * before calling any external function, and checks the value following
19 * the call. It then calls this function, which will trap if the values are
20 * not the same. Usually this means that the prototype used to call
21 * the function is incorrect. It can also mean that the .spec entry has
22 * the wrong calling convention or parameters.
27 void _chkesp_failed(void)
29 ERR("stack got corrupted!\n");
35 /*********************************************************************
36 * _resetstkoflw (MSVCRT.@)
38 int CDECL
_resetstkoflw(void)
42 /* causes stack fault that updates NtCurrentTeb()->Tib.StackLimit */
43 return VirtualProtect( &stack_addr
, 1, PAGE_GUARD
|PAGE_READWRITE
, NULL
);