File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -588,10 +588,12 @@ CAMLexport int caml_rev_convert_signal_number(int signo)
588
588
return signo ;
589
589
}
590
590
591
+ #ifdef __linux__
591
592
static size_t max_size_t (size_t a , size_t b )
592
593
{
593
594
return (a > b ) ? a : b ;
594
595
}
596
+ #endif
595
597
596
598
void * caml_init_signal_stack (size_t * signal_stack_size )
597
599
{
Original file line number Diff line number Diff line change @@ -113,7 +113,11 @@ DECLARE_SIGNAL_HANDLER(segv_handler)
113
113
char * protected_low = Protected_stack_page (block );
114
114
char * protected_high = protected_low + caml_plat_pagesize ;
115
115
if ((fault_addr >= protected_low ) && (fault_addr < protected_high )) {
116
+ #ifdef SYS_macosx
117
+ context -> uc_mcontext -> __ss .__rip = (unsigned long long ) & caml_raise_stack_overflow_nat ;
118
+ #else
116
119
context -> uc_mcontext .gregs [REG_RIP ]= (greg_t ) & caml_raise_stack_overflow_nat ;
120
+ #endif
117
121
} else {
118
122
act .sa_handler = SIG_DFL ;
119
123
act .sa_flags = 0 ;
You can’t perform that action at this time.
0 commit comments