summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-23 02:35:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-23 02:35:18 +0000
commit053759edfc80a51eeea0cfa9c46e4bb57589bf00 (patch)
tree9a03d850a4823e5e50269ec5aaa721102938e404 /vm_insnhelper.c
parentcf3890205fc657119a5dd7d94955122b0cfa00f2 (diff)
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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 3 insertions, 1 deletions
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 *