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
This commit is contained in:
nobu 2014-06-23 02:35:18 +00:00
parent cf3890205f
commit 053759edfc
5 changed files with 24 additions and 6 deletions

View file

@ -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