mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure.in: exit with failure
* configure.in (rb_cv_broken_backtrace): exit with failure normally, no needs to abort. [ruby-core:63678] [Bug #10008] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a29da3b76
commit
5e14a4c4b3
2 changed files with 12 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Jul 13 10:56:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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 <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* ext/win32ole/win32ole.c (fole_record_method_missing): correct
|
||||
|
|
14
configure.in
14
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,
|
||||
|
|
Loading…
Reference in a new issue