La detection de debordement de pile ne marche pas sur Alpha/DUnix (on n'arrive pas a recuperer la valeur des registres 13 et 15)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3622 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
bf110cd0e2
commit
c6bef2669d
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#if defined(TARGET_sparc) && defined(SYS_solaris)
|
||||
#if (defined(TARGET_sparc) && defined(SYS_solaris))
|
||||
#include <ucontext.h>
|
||||
#endif
|
||||
#include "alloc.h"
|
||||
|
@ -313,7 +313,7 @@ value install_signal_handler(value signal_number, value action) /* ML */
|
|||
act = SIG_IGN;
|
||||
break;
|
||||
default: /* Signal_handle */
|
||||
act = handle_signal;
|
||||
act = (void (*)(int)) handle_signal;
|
||||
break;
|
||||
}
|
||||
#ifdef POSIX_SIGNALS
|
||||
|
@ -486,19 +486,6 @@ static void segv_handler(int signo, siginfo_t * info, void * arg)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_alpha) && defined(SYS_digital)
|
||||
static void segv_handler(int signo, siginfo_t * info, void * arg)
|
||||
{
|
||||
ucontext_t * context = (ucontext_t *) arg;
|
||||
if (is_stack_overflow((char *) info->si_addr, caml_last_return_address)) {
|
||||
/* Recover young_ptr and caml_exception_pointer from regs $13 and $15 */
|
||||
young_ptr = (char *) (context->uc_mcontext.sc_regs[13]);
|
||||
caml_exception_pointer = (char *) (context->uc_mcontext.sc_regs[15]);
|
||||
raise_stack_overflow();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Initialization of signal stuff */
|
||||
|
|
|
@ -756,7 +756,7 @@ fi
|
|||
# Determine if system stack overflows can be detected
|
||||
|
||||
case "$arch,$model,$system" in
|
||||
i386,*,*|alpha,*,digital)
|
||||
i386,*,*)
|
||||
if ./runtest -DTARGET_$arch -DSYS_$system stackov.c; then
|
||||
echo "System stack overflow can be detected."
|
||||
echo "#define HAS_STACK_OVERFLOW_DETECTION" >> s.h
|
||||
|
|
Loading…
Reference in New Issue