summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-21 14:51:01 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-21 14:51:01 +0000
commit787a90cdc5fb62568de0e1142f19effacec55482 (patch)
treed92d975c17e1817e5d10d3a2c7f7fa7ef13eaf4d /test
parent2f4529e7a686c6dc02da3b86ab0b48a81a258a7d (diff)
merge revision(s) 43685,43690,43705: [Backport #9110]
* eval_jump.c (rb_exec_end_proc): fix double free or corruption error when reentering by callcc. [ruby-core:58329] [Bug #9110] * test/ruby/test_beginendblock.rb: test for above. * eval_jump.c (rb_exec_end_proc): unlink and free procs data before calling for each procs. [Bug #9110] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_beginendblock.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb
index beb934b1ac..8054f822fc 100644
--- a/test/ruby/test_beginendblock.rb
+++ b/test/ruby/test_beginendblock.rb
@@ -167,4 +167,15 @@ EOW
assert_equal(["", "", 42], [out, err, status.exitstatus], "#{bug5218}: #{ex}")
end
end
+
+ def test_callcc_at_exit
+ bug9110 = '[ruby-core:58329][Bug #9110]'
+ script = <<EOS
+require "continuation"
+c = nil
+at_exit { c.call }
+at_exit { callcc {|_c| c = _c } }
+EOS
+ assert_normal_exit(script, bug9110)
+ end
end