diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-30 12:35:49 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-30 12:35:49 +0000 |
commit | 687763bc4f7cc7acb57b3ebb4641eeeec0648c22 (patch) | |
tree | e8ae1ef88a93e4ca8f21401b00d18645d6ca7bf3 /test | |
parent | 896d9fb9957f3c2d0a739e156f0775faa326d13c (diff) |
merge revision(s) 56558,59116,59136: [Backport #12670]
* gc.c (heap_page_resurrect): do not return tomb_pages when
page->freelist == NULL.
[Bug #12670]
test for [Bug #12670]
heap corruption by deferred free.
gc.c: expand sorted pages
* gc.c (heap_page_allocate): expand sorted pages before inserting
allocated new page. [Bug #12670]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/typeddata/test_typeddata.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/-ext-/typeddata/test_typeddata.rb b/test/-ext-/typeddata/test_typeddata.rb index 058b7b70c5..c768b5e752 100644 --- a/test/-ext-/typeddata/test_typeddata.rb +++ b/test/-ext-/typeddata/test_typeddata.rb @@ -17,4 +17,15 @@ class Test_TypedData < Test::Unit::TestCase obj = eval("class C\u{1f5ff}; self; end").new assert_raise_with_message(TypeError, /C\u{1f5ff}/) {Bug::TypedData.check(obj)} end + + def test_deferred_free + assert_ruby_status([], "#{<<-"begin;"}\n#{<<-"end;"}") + require "-test-/typeddata" + begin; + n = 1 << 20 + Bug::TypedData.make(n) + end; + rescue MiniTest::Assertion => e + skip e.message + end end |