X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea44a43c908f20d119d1077364ce32bb422515e4..28e0e67cf29da1423d9932ec05870d08394af669:/src/simix/smx_global.c diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 7df250c5c1..a169f8d9e6 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -40,11 +40,17 @@ static void _XBT_CALL inthandler(int ignored) exit(1); } +#ifndef WIN32 static void _XBT_CALL segvhandler(int signum, siginfo_t *siginfo, void *context) { if (siginfo->si_signo == SIGSEGV && siginfo->si_code == SEGV_ACCERR) { fprintf(stderr, - "Access violation detected. This can result from a stack overflow.\n" + "Access violation detected.\n" + "This can result from a programming error in your code or, although less likely,\n" + "from a bug in SimGrid itself. This can also be the sign of a bug in the OS or\n" + "in third-party libraries. Failing hardware can sometimes generate such errors\n" + "too.\n" + "Finally, if nothing of the above applies, this can result from a stack overflow.\n" "Try to increase stack size with --cfg=contexts/stack_size (current size is %d KiB).\n", smx_context_stack_size / 1024); if (XBT_LOG_ISENABLED(simix_kernel, xbt_log_priority_debug)) { @@ -98,6 +104,7 @@ static void install_segvhandler(void) } } +#endif /********************************* SIMIX **************************************/ XBT_INLINE double SIMIX_timer_next(void) @@ -155,9 +162,10 @@ void SIMIX_global_init(int *argc, char **argv) /* Prepare to display some more info when dying on Ctrl-C pressing */ signal(SIGINT, inthandler); +#ifndef WIN32 /* Install SEGV handler */ install_segvhandler(); - +#endif /* register a function to be called by SURF after the environment creation */ sg_platf_init(); sg_platf_postparse_add_cb(SIMIX_post_create_environment);