Project

General

Profile

Bug #11750

SEGV with Enumerator, yield and proc.

Added by akr (Akira Tanaka) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-11-29 trunk 52789) [x86_64-linux]
[ruby-core:71737]

Description

I found SEGV as follows.

% cat z.rb 
def f
  Enumerator.new {|y|
    1000000.times {
      yield
      y.yield
    }
  }
end

def g
  x = proc {}
  f(&x)
end

e = g
e.each {}

% ./miniruby z.rb
(snip)

Files

bug-11750.log (11.2 KB) bug-11750.log nobu (Nobuyoshi Nakada), 11/30/2015 05:35 AM

Also available in: Atom PDF