diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-22 06:18:03 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-22 06:18:03 +0000 |
commit | b0f5d2eb2c4dea86287a6896e980c6ba6289dc0e (patch) | |
tree | 7b7cdf63729a3cc9314eba22ae7da1f5fd72b467 /test | |
parent | aef285f5dfb184e1a8a83eb5eb9146ba0f378e54 (diff) |
merge revision(s) 54484: [Backport #12095]
* vm_core.h (rb_vm_struct): make at_exit a single linked list but
not RArray, not to mark the registered functions by the write
barrier. based on the patches by Evan Phoenix.
[ruby-core:73908] [Bug #12095]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/vm/test_at_exit.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/-ext-/vm/test_at_exit.rb b/test/-ext-/vm/test_at_exit.rb new file mode 100644 index 0000000000..61ad831792 --- /dev/null +++ b/test/-ext-/vm/test_at_exit.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: false +class TestVM < Test::Unit::TestCase + + # [Bug #12095] + def test_at_exit + + assert_in_out_err([], <<-"end;", %w[begin end]) # do + require '-test-/vm/at_exit' + Bug::VM.register_at_exit(false) + 1000.times do + Bug::VM.register_at_exit(nil) + ["x"]*1000 + end + GC.start + Bug::VM.register_at_exit(true) + end; + end +end + |