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 --- test/ruby/test_exception.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/ruby/test_exception.rb') diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index b80cf00cac..a92050c1d3 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -529,7 +529,8 @@ end.join end def test_stackoverflow - assert_raise(SystemStackError){m} + e = assert_raise(SystemStackError){m} + assert_operator(e.backtrace.size, :>, 10) end def test_machine_stackoverflow -- cgit v1.2.3