Actions
Bug #10368
closedGC mark miss on bindings
Description
以下のコードでSEGVすることがあります。
mに渡したブロックがGCされてしまうのが原因です。
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
Updated by ktsj (Kazuki Tsujimoto) about 10 years ago
- 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.
Updated by nagachika (Tomoyuki Chikanaga) about 10 years ago
- 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.
Updated by usa (Usaku NAKAMURA) about 10 years ago
- 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.
Actions
Like0
Like0Like0Like0