ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: nobu@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:71745] [Ruby trunk - Bug #11750] SEGV with Enumerator, yield and proc.
Date: Mon, 30 Nov 2015 05:36:32 +0000	[thread overview]
Message-ID: <redmine.journal-55148.20151130053631.cc7684f081ecca1b@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11750.20151129162428@ruby-lang.org

Issue #11750 has been updated by Nobuyoshi Nakada.

File bug-11750.log added
Description updated

By bisecting, it raises `SytemStackError` or segfaults since r51243.

~~~
* vm_core.h: remove blockprocval field from rb_proc_t and rb_binding_t.
  Instead of this field, mark given block in Proc at rb_env_t::env.
~~~

`Enumerator`, `Generator`, or `Yielder` may need more marking or write-barrier.

----------------------------------------
Bug #11750: SEGV with Enumerator, yield and proc.
https://bugs.ruby-lang.org/issues/11750#change-55148

* Author: Akira Tanaka
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.0dev (2015-11-29 trunk 52789) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
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)


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

  parent reply	other threads:[~2015-11-30  5:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11750.20151129162428@ruby-lang.org>
2015-11-29 16:24 ` [ruby-core:71737] [Ruby trunk - Bug #11750] [Open] SEGV with Enumerator, yield and proc akr
2015-11-30  5:36 ` nobu [this message]
2015-12-07  7:24 ` [ruby-core:71883] [Ruby trunk - Bug #11750] " ko1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-55148.20151130053631.cc7684f081ecca1b@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).