aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_beginendblock.rb
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-15 15:29:23 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-15 15:29:23 +0000
commit77a5f5b57b3aed623a7aaed65e03f3ebc4070137 (patch)
tree3410f733bdb68c4836305465b4257357fa29c2df /test/ruby/test_beginendblock.rb
parent549b35c1dc771d233a72466a6cae8363908f3350 (diff)
downloadruby-77a5f5b57b3aed623a7aaed65e03f3ebc4070137.tar.gz
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_beginendblock.rb')
-rw-r--r--test/ruby/test_beginendblock.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb
index 0543476875..4e9a4b72b9 100644
--- a/test/ruby/test_beginendblock.rb
+++ b/test/ruby/test_beginendblock.rb
@@ -173,4 +173,16 @@ EOW
assert_equal(["", "", 42], [out, err, status.exitstatus], "#{bug5218}: #{ex}")
end
end
+
+ def test_callcc_at_exit
+ bug9110 = '[ruby-core:58329][Bug #9110]'
+ ruby = EnvUtil.rubybin
+ script = <<EOS
+require "continuation"
+c = nil
+at_exit { c.call }
+at_exit { callcc {|_c| c = _c } }
+EOS
+ assert system(ruby, "-e", script)
+ end
end