Bug #903: segmentation fault in irb
http://redmine.ruby-lang.org/issues/show/903

Author: marcus booster
Status: Open, Priority: Normal
Target version: 1.9.1 Release Candidate

I'm new to Ruby and was playing around to determine how some expressions work. Here's the result of one such test:
irb(main):016:0> yield "f" do |x|
irb(main):017:1* puts x
irb(main):018:1> end
c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/workspace.rb:80: [BUG] Segmentation fault
ruby 1.9.1 (2008-10-28 revision 19983) [i386-mswin32]

-- control frame ----------
c:0021 p:---- s:0072 b:0072 l:000071 d:000071 CFUNC  :eval
c:0020 p:0027 s:0065 b:0065 l:000064 d:000064 METHOD c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/workspace.rb:80
c:0019 p:0031 s:0058 b:0057 l:000056 d:000056 METHOD c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/context.rb:218
c:0018 p:0030 s:0052 b:0052 l:001cbc d:000051 BLOCK  c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:149
c:0017 p:0037 s:0044 b:0044 l:000043 d:000043 METHOD c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:263
c:0016 p:0011 s:0039 b:0039 l:001cbc d:000038 BLOCK  c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:146
c:0015 p:0113 s:0035 b:0035 l:000022 d:000034 BLOCK  c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/ruby-lex.rb:243
c:0014 p:---- s:0034 b:0034 l:000033 d:000033 FINISH :block_given?
c:0013 p:---- s:0032 b:0032 l:000031 d:000031 CFUNC  :loop
c:0012 p:0009 s:0029 b:0029 l:000022 d:000028 BLOCK  c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/ruby-lex.rb:230
c:0011 p:---- s:0029 b:0029 l:000028 d:000028 FINISH :each
c:0010 p:---- s:0027 b:0027 l:000026 d:000026 CFUNC  :catch
c:0009 p:0023 s:0023 b:0023 l:000022 d:000022 METHOD c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0008 p:0042 s:0020 b:0020 l:001cbc d:001cbc METHOD c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:145
c:0007 p:0011 s:0017 b:0017 l:002564 d:000016 BLOCK  c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:69
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH :(null)
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC  :catch
c:0004 p:0172 s:0011 b:0011 l:002564 d:002564 METHOD c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:68
c:0003 p:0039 s:0006 b:0006 l:000005 d:000005 TOP    c:/usr/local/ruby-1.9.1/bin/irb.bat:20
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP    <dummy toplevel>:271
---------------------------
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/context.rb:218:in `evaluate'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:149:in `block (2 levels) in eval_input'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:263:in `signal_status'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:146:in `block in eval_input'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in `loop'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in `block in each_top_level_statement'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `catch'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `each_top_level_statement'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:145:in `eval_input'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:69:in `block in start'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:68:in `catch'"
DBG> : "c:/usr/local/ruby-1.9.1/lib/ruby/1.9.1/irb.rb:68:in `start'"
DBG> : "c:/usr/local/ruby-1.9.1/bin/irb.bat:20:in `<main>'"

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


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