Issue #6216 has been updated by Nobuyoshi Nakada.

Status changed from Assigned to Closed
% Done changed from 0 to 100

Applied in changeset r46502.

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

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-47328

* Author: Hal Brodigan
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Category: core
* Target version: next minor
----------------------------------------
When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.

---Files--------------------------------
stack-overflow.patch (630 Bytes)


-- 
https://bugs.ruby-lang.org/