Actions
Bug #10218
closed手続きを再帰するとSegmentation faultが発生する
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
Backport:
Description
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
Actions
Like0
Like0Like0Like0Like0