From: "ko1 (Koichi Sasada)" <redmine@...>
Date: 2012-10-03T18:38:19+09:00
Subject: [ruby-dev:46198] [ruby-trunk - Bug #7084] RubyVM::InstructionSequence.compile("1+"*10000 + "1") causes SystemStackError or Segmentation Fault


Issue #7084 has been updated by ko1 (Koichi Sasada).


これって,r37072 で直ったんでしょうか.

----------------------------------------
Bug #7084: RubyVM::InstructionSequence.compile("1+"*10000 + "1") causes SystemStackError or Segmentation Fault
https://bugs.ruby-lang.org/issues/7084#change-29980

Author: mrkn (Kenta Murata)
Status: Closed
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-09-29 trunk 37053) [x86_64-darwin12.1.0]


以下のように ulimit -s の値に応じて stack level too deep と Segmentation Fault のどちらかが発生するようです。

$ .prefix/bin/ruby -v
ruby 2.0.0dev (2012-09-29 trunk 37053) [x86_64-darwin12.1.0]
$ ulimit -s
8192
$ .prefix/bin/ruby -e 'p RubyVM::InstructionSequence.compile("1+"*10000+"1")'
-e:1: stack level too deep (SystemStackError)
$ ulimit -s 32768
$ .prefix/bin/ruby -e 'p RubyVM::InstructionSequence.compile("1+"*10000+"1")'
-e:1: [BUG] Segmentation fault
ruby 2.0.0dev (2012-09-29 trunk 37053) [x86_64-darwin12.1.0]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0009 e:000008 CFUNC  :compile
c:0002 p:0028 s:0005 e:000bc8 EVAL   -e:1 [FINISH]
c:0001 p:0000 s:0002 e:0020e8 TOP    [FINISH]

-e:1:in `<main>'
-e:1:in `compile'

-- C level backtrace information -------------------------------------------

   See Crash Report log file under ~/Library/Logs/CrashReporter or
   /Library/Logs/CrashReporter, for the more detail of.

-- Other runtime information -----------------------------------------------

* Loaded script: -e

* Loaded features:



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