From 053759edfc80a51eeea0cfa9c46e4bb57589bf00 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Jun 2014 02:35:18 +0000 Subject: Backtrace for SystemStackError * eval.c (setup_exception): set backtrace in system stack error other than the pre-allocated sysstack_error. [Feature #6216] * proc.c (Init_Proc): freeze the pre-allocated sysstack_error. * vm_insnhelper.c (vm_stackoverflow): raise new instance for each times without calling any methods to keep the backtrace with no further stack overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 64e58f0842..e9dc27139a 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -27,7 +27,9 @@ static rb_control_frame_t *vm_get_ruby_level_caller_cfp(rb_thread_t *th, rb_cont static void vm_stackoverflow(void) { - rb_exc_raise(sysstack_error); + VALUE e = rb_obj_alloc(rb_eSysStackError); + rb_obj_copy_ivar(e, sysstack_error); + rb_exc_raise(e); } static inline rb_control_frame_t * -- cgit v1.2.3