diff --git a/ChangeLog b/ChangeLog index 173b7106e9..3890d33492 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jul 13 10:56:26 2014 Nobuyoshi Nakada + + * configure.in (rb_cv_broken_backtrace): exit with failure + normally, no needs to abort. [ruby-core:63678] [Bug #10008] + Sat Jul 12 15:10:22 2014 Masaki Suketa * ext/win32ole/win32ole.c (fole_record_method_missing): correct diff --git a/configure.in b/configure.in index 36c58da80b..7264594dd1 100644 --- a/configure.in +++ b/configure.in @@ -3050,24 +3050,25 @@ void sigsegv(int signum, siginfo_t *info, void *ctx){ if (n > 0) { /*fprintf(stdout, "backtrace:%d\n",n);*/ } else { - abort(); + _exit(EXIT_FAILURE); } - _exit(0); + _exit(EXIT_SUCCESS); } int -main() +main(void) { + volatile int *a = NULL; stack_t ss; ss.ss_sp = malloc(SIGSTKSZ); if (ss.ss_sp == NULL) { fprintf(stderr, "cannot allocate memory for sigaltstack\n"); - abort(); + return EXIT_FAILURE; } ss.ss_size = SIGSTKSZ; ss.ss_flags = 0; if (sigaltstack(&ss, NULL) == -1) { fprintf(stderr, "sigaltstack failed\n"); - abort(); + return EXIT_FAILURE; } struct sigaction sa; memset(&sa, 0, sizeof(struct sigaction)); @@ -3076,9 +3077,8 @@ main() sa.sa_flags |= SA_SIGINFO; sa.sa_flags |= SA_ONSTACK; sigaction(SIGSEGV, &sa, NULL); - int *a = NULL; a[0] = 1; - return 0; + return EXIT_SUCCESS; } ], rb_cv_broken_backtrace=no,