diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-09 17:47:37 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-09 17:47:37 +0000 |
commit | 7aab72f7367b81fa76fcb4e9281012134495d6cf (patch) | |
tree | 77ae38127f782de376f45048f8d4cd58b88193d6 /test/-ext- | |
parent | 443773836efab153552c51d22880614e6949616b (diff) | |
download | ruby-7aab72f7367b81fa76fcb4e9281012134495d6cf.tar.gz |
Fix crash when loading iseq from an array
Objects loaded during iseq deserialization using arrays need to be added
to the compile time mark array so that they stay alive until iseqs
finish loading.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r-- | test/-ext-/iseq_load/test_iseq_load.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/-ext-/iseq_load/test_iseq_load.rb b/test/-ext-/iseq_load/test_iseq_load.rb index 97ba3fec66..7a8120ad1c 100644 --- a/test/-ext-/iseq_load/test_iseq_load.rb +++ b/test/-ext-/iseq_load/test_iseq_load.rb @@ -16,6 +16,13 @@ class TestIseqLoad < Test::Unit::TestCase end; end + def test_stressful_roundtrip + stress, GC.stress = GC.stress, true + test_bug8543 + ensure + GC.stress = stress + end + def test_case_when assert_iseq_roundtrip "#{<<~"begin;"}\n#{<<~'end;'}" begin; |