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;
88// NOTE These functions are never mangled as they are not tested against compiler-rt
99
1010intrinsics ! {
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+
1124 #[ naked]
1225 #[ cfg( all(
1326 windows,
1427 target_env = "gnu" ,
1528 not( feature = "no-asm" )
1629 ) ) ]
1730 pub unsafe extern "C" fn _alloca( ) {
18- // _chkstk and _alloca are the same function
31+ // __chkstk and _alloca are the same function
1932 core:: arch:: asm!(
2033 "push %ecx" ,
2134 "cmp $0x1000,%eax" ,
You can’t perform that action at this time.
0 commit comments