diff options
author | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-15 15:29:23 +0000 |
---|---|---|
committer | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-15 15:29:23 +0000 |
commit | 77a5f5b57b3aed623a7aaed65e03f3ebc4070137 (patch) | |
tree | 3410f733bdb68c4836305465b4257357fa29c2df /test | |
parent | 549b35c1dc771d233a72466a6cae8363908f3350 (diff) | |
download | ruby-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')
-rw-r--r-- | test/ruby/test_beginendblock.rb | 12 |
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 |