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
Updated by zonuexe (Kenta USAMI) about 10 years ago
https://bugs.ruby-lang.org/issues/9945 と同じ原因で、既に修正済みのような気がする
Updated by nagachika (Tomoyuki Chikanaga) about 10 years ago
- Related to Bug #9945: Segmentation fault when defining recursive method added
Updated by nagachika (Tomoyuki Chikanaga) about 10 years ago
- Is duplicate of Bug #9454: The define_method(:class) segfault added
Updated by nagachika (Tomoyuki Chikanaga) about 10 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0Like0Like0