ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:48616] [ruby-trunk - Bug #10368] [Assigned] GC mark miss on bindings
       [not found] <redmine.issue-10368.20141011105815@ruby-lang.org>
@ 2014-10-11 10:58 ` kazuki
  2014-10-18 11:46 ` [ruby-dev:48659] [ruby-trunk - Bug #10368] [Closed] " kazuki
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: kazuki @ 2014-10-11 10:58 UTC (permalink / raw
  To: ruby-dev

Issue #10368 has been reported by Kazuki Tsujimoto.

----------------------------------------
Bug #10368: GC mark miss on bindings
https://bugs.ruby-lang.org/issues/10368

* Author: Kazuki Tsujimoto
* Status: Assigned
* Priority: Normal
* Assignee: Koichi Sasada
* Category: 
* Target version: 
* ruby -v: ruby 2.2.0dev (2014-10-11 trunk 47881) [x86_64-linux]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED
----------------------------------------
以下のコードでSEGVすることがあります。
mに渡したブロックがGCされてしまうのが原因です。

~~~ruby
def m
  binding
end

GC.stress = true
b = nil
tap do 
  b = m {}
end
GC.start
0.times.to_a
b.eval('yield')
~~~

ブロックに対応するProcオブジェクトをrb_binding_tに持たせるようにするパッチを添付します。

---Files--------------------------------
0001-add-blockprocval-to-rb_block_t.patch (4.87 KB)
0002-use-rb_vm_make_binding-instead-of-rb_binding_new_with_cfp.patch (1.9 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:48659] [ruby-trunk - Bug #10368] [Closed] GC mark miss on bindings
       [not found] <redmine.issue-10368.20141011105815@ruby-lang.org>
  2014-10-11 10:58 ` [ruby-dev:48616] [ruby-trunk - Bug #10368] [Assigned] GC mark miss on bindings kazuki
@ 2014-10-18 11:46 ` kazuki
  2014-10-18 18:35 ` [ruby-dev:48661] [ruby-trunk - Bug #10368] " nagachika00
  2014-10-20  5:46 ` [ruby-dev:48677] " usa
  3 siblings, 0 replies; 4+ messages in thread
From: kazuki @ 2014-10-18 11:46 UTC (permalink / raw
  To: ruby-dev

Issue #10368 has been updated by Kazuki Tsujimoto.

Status changed from Assigned to Closed
% Done changed from 0 to 100

Applied in changeset r48000.

----------
* vm_core.h, vm.c, proc.c: fix GC mark miss on bindings.
  [ruby-dev:48616] [Bug #10368]

* test/ruby/test_eval.rb: add a test code.

----------------------------------------
Bug #10368: GC mark miss on bindings
https://bugs.ruby-lang.org/issues/10368#change-49516

* Author: Kazuki Tsujimoto
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Category: 
* Target version: 
* ruby -v: ruby 2.2.0dev (2014-10-11 trunk 47881) [x86_64-linux]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED
----------------------------------------
以下のコードでSEGVすることがあります。
mに渡したブロックがGCされてしまうのが原因です。

~~~ruby
def m
  binding
end

GC.stress = true
b = nil
tap do 
  b = m {}
end
GC.start
0.times.to_a
b.eval('yield')
~~~

ブロックに対応するProcオブジェクトをrb_binding_tに持たせるようにするパッチを添付します。

---Files--------------------------------
0001-add-blockprocval-to-rb_block_t.patch (4.87 KB)
0002-use-rb_vm_make_binding-instead-of-rb_binding_new_with_cfp.patch (1.9 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:48661] [ruby-trunk - Bug #10368] GC mark miss on bindings
       [not found] <redmine.issue-10368.20141011105815@ruby-lang.org>
  2014-10-11 10:58 ` [ruby-dev:48616] [ruby-trunk - Bug #10368] [Assigned] GC mark miss on bindings kazuki
  2014-10-18 11:46 ` [ruby-dev:48659] [ruby-trunk - Bug #10368] [Closed] " kazuki
@ 2014-10-18 18:35 ` nagachika00
  2014-10-20  5:46 ` [ruby-dev:48677] " usa
  3 siblings, 0 replies; 4+ messages in thread
From: nagachika00 @ 2014-10-18 18:35 UTC (permalink / raw
  To: ruby-dev

Issue #10368 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

Backported into `ruby_2_1` at r48004.

----------------------------------------
Bug #10368: GC mark miss on bindings
https://bugs.ruby-lang.org/issues/10368#change-49521

* Author: Kazuki Tsujimoto
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Category: 
* Target version: 
* ruby -v: ruby 2.2.0dev (2014-10-11 trunk 47881) [x86_64-linux]
* Backport: 2.0.0: REQUIRED, 2.1: DONE
----------------------------------------
以下のコードでSEGVすることがあります。
mに渡したブロックがGCされてしまうのが原因です。

~~~ruby
def m
  binding
end

GC.stress = true
b = nil
tap do 
  b = m {}
end
GC.start
0.times.to_a
b.eval('yield')
~~~

ブロックに対応するProcオブジェクトをrb_binding_tに持たせるようにするパッチを添付します。

---Files--------------------------------
0001-add-blockprocval-to-rb_block_t.patch (4.87 KB)
0002-use-rb_vm_make_binding-instead-of-rb_binding_new_with_cfp.patch (1.9 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:48677] [ruby-trunk - Bug #10368] GC mark miss on bindings
       [not found] <redmine.issue-10368.20141011105815@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2014-10-18 18:35 ` [ruby-dev:48661] [ruby-trunk - Bug #10368] " nagachika00
@ 2014-10-20  5:46 ` usa
  3 siblings, 0 replies; 4+ messages in thread
From: usa @ 2014-10-20  5:46 UTC (permalink / raw
  To: ruby-dev

Issue #10368 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE

Backported into `ruby_2_0_0` at r48048.

----------------------------------------
Bug #10368: GC mark miss on bindings
https://bugs.ruby-lang.org/issues/10368#change-49549

* Author: Kazuki Tsujimoto
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Category: 
* Target version: 
* ruby -v: ruby 2.2.0dev (2014-10-11 trunk 47881) [x86_64-linux]
* Backport: 2.0.0: DONE, 2.1: DONE
----------------------------------------
以下のコードでSEGVすることがあります。
mに渡したブロックがGCされてしまうのが原因です。

~~~ruby
def m
  binding
end

GC.stress = true
b = nil
tap do 
  b = m {}
end
GC.start
0.times.to_a
b.eval('yield')
~~~

ブロックに対応するProcオブジェクトをrb_binding_tに持たせるようにするパッチを添付します。

---Files--------------------------------
0001-add-blockprocval-to-rb_block_t.patch (4.87 KB)
0002-use-rb_vm_make_binding-instead-of-rb_binding_new_with_cfp.patch (1.9 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-20  6:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-10368.20141011105815@ruby-lang.org>
2014-10-11 10:58 ` [ruby-dev:48616] [ruby-trunk - Bug #10368] [Assigned] GC mark miss on bindings kazuki
2014-10-18 11:46 ` [ruby-dev:48659] [ruby-trunk - Bug #10368] [Closed] " kazuki
2014-10-18 18:35 ` [ruby-dev:48661] [ruby-trunk - Bug #10368] " nagachika00
2014-10-20  5:46 ` [ruby-dev:48677] " usa

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).