mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +00:00
[CRT]
- implement _chkesp svn path=/trunk/; revision=54455
This commit is contained in:
parent
1f402857de
commit
17abc7b17d
|
@ -306,6 +306,7 @@ list(APPEND CRT_SOURCE
|
|||
|
||||
if(ARCH MATCHES i386)
|
||||
list(APPEND CRT_SOURCE
|
||||
except/i386/chkesp.s
|
||||
except/i386/prolog.s
|
||||
except/i386/seh.s
|
||||
except/i386/seh_prolog.s
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<directory name="except">
|
||||
<if property="ARCH" value="i386">
|
||||
<directory name="i386">
|
||||
<file>chkesp.s</file>
|
||||
<file>chkstk_asm.s</file>
|
||||
<file>chkstk_ms.s</file>
|
||||
</directory>
|
||||
|
|
36
reactos/lib/sdk/crt/except/i386/chkesp.s
Normal file
36
reactos/lib/sdk/crt/except/i386/chkesp.s
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS C run time library
|
||||
* PURPOSE: Stack checker
|
||||
* PROGRAMMERS: Jérôme Gardou
|
||||
*/
|
||||
|
||||
#include <asm.inc>
|
||||
#include <ks386.inc>
|
||||
|
||||
/* Code is taken from wine 1.3.33,
|
||||
* Copyright Jon Griffiths and Alexandre Julliard
|
||||
*/
|
||||
EXTERN __chkesp_failed:PROC
|
||||
|
||||
PUBLIC __chkesp
|
||||
.code
|
||||
__chkesp:
|
||||
jnz .test_failed
|
||||
ret
|
||||
|
||||
.test_failed:
|
||||
push ebp
|
||||
mov ebp, esp
|
||||
sub esp, 12
|
||||
push eax
|
||||
push ecx
|
||||
push edx
|
||||
call __chkesp_failed
|
||||
pop edx
|
||||
pop ecx
|
||||
pop eax
|
||||
leave
|
||||
ret
|
||||
|
||||
END
|
|
@ -24,14 +24,10 @@
|
|||
|
||||
#ifdef __i386__
|
||||
|
||||
void _chkesp(void)
|
||||
{
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void _chkesp(void)
|
||||
void _chkesp_failed(void)
|
||||
{
|
||||
ERR("stack got corrupted!\n");
|
||||
__debugbreak();
|
||||
}
|
||||
|
||||
#endif /* __i386__ */
|
||||
|
|
Loading…
Reference in a new issue