[ruby-trunk - Bug #10218] [Open] 手続きを再帰するとSegmentation faultが発生する

Issue #10218 has been reported by Kenta USAMI.


Bug #10218: 手続きを再帰するとSegmentation faultが発生する

  • Author: Kenta USAMI
  • Status: Open
  • Priority: Normal
  • Assignee:
  • Category:
  • Target version:
  • ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
  • Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN

stack level too deep (SystemStackError)が発生することを期待した。

% ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
% ruby -e"r = ->(n){ print %(#{n},); r.(n+1) }; r.(0)" > /tmp/foo_out 
2>/tmp/foo_err
zsh: abort      ruby -e"r = ->(n){ print %(#{n},); r.(n+1) }; r.(0)" > 
/tmp/foo_out 2>/tmp/foo_err

(クラッシュレポートは添付)

なお、手元の環境では2.2.0devでは発生しない。

% ruby -v
ruby 2.2.0dev (2014-09-09 trunk 47479) [x86_64-darwin13]
% ruby -e"r = ->(n){ print %(#{n},); r.(n+1) }; r.(0)" > /tmp/a1
-e:1:in `block in <main>': stack level too deep (SystemStackError)
  from -e:1:in `call'
  from -e:1:in `block in <main>'
  from -e:1:in `call'
  from -e:1:in `block in <main>'
  from -e:1:in `call'
  from -e:1:in `block in <main>'
  from -e:1:in `call'
  from -e:1:in `block in <main>'
   ... 6498 levels...
  from -e:1:in `call'
  from -e:1:in `block in <main>'
  from -e:1:in `call'
  from -e:1:in `<main>'

—Files--------------------------------
ruby_2014-09-10-012731_tadsan-air.crash (46.9 KB)