File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,27 @@ use core::intrinsics;
8
8
// NOTE These functions are never mangled as they are not tested against compiler-rt
9
9
10
10
intrinsics ! {
11
+ #[ naked]
12
+ #[ cfg( all(
13
+ windows,
14
+ target_env = "gnu" ,
15
+ not( feature = "no-asm" )
16
+ ) ) ]
17
+ pub unsafe extern "C" fn __chkstk( ) {
18
+ core:: arch:: asm!(
19
+ "jmp __alloca" , // Jump to __alloca since fallthrough may be unreliable"
20
+ options( noreturn, att_syntax)
21
+ ) ;
22
+ }
23
+
11
24
#[ naked]
12
25
#[ cfg( all(
13
26
windows,
14
27
target_env = "gnu" ,
15
28
not( feature = "no-asm" )
16
29
) ) ]
17
30
pub unsafe extern "C" fn _alloca( ) {
18
- // _chkstk and _alloca are the same function
31
+ // __chkstk and _alloca are the same function
19
32
core:: arch:: asm!(
20
33
"push %ecx" ,
21
34
"cmp $0x1000,%eax" ,
You can’t perform that action at this time.
0 commit comments