diff options
author | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-18 09:58:31 +0000 |
---|---|---|
committer | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-18 09:58:31 +0000 |
commit | 8457bea9ab5394cb43f4d5019ccb8836675366ad (patch) | |
tree | 91e0e1cad25bdd69e017ab7d5f92808029a33331 | |
parent | 9c00c1234d39eef8d42c63aa95353def7ee6a1da (diff) | |
download | ruby-8457bea9ab5394cb43f4d5019ccb8836675366ad.tar.gz |
* vm.c (vm_define_method): improve guard of iseq from GC. Fix
failure or segmentation fault in test_singleton_method(TestGc)
on sparc Solaris10 compiled with Oracle Solaris Studio 12.2.
[Bug #5762] [ruby-dev:45000] [Bug #4178]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | vm.c | 3 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Sun Dec 18 18:52:37 2011 Naohisa Goto <ngotogenome@gmail.com> + + * vm.c (vm_define_method): improve guard of iseq from GC. Fix + failure or segmentation fault in test_singleton_method(TestGc) + on sparc Solaris10 compiled with Oracle Solaris Studio 12.2. + [Bug #5762] [ruby-dev:45000] [Bug #4178] + Sun Dec 18 14:34:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): does not follow @@ -1912,8 +1912,7 @@ vm_define_method(rb_thread_t *th, VALUE obj, ID id, VALUE iseqval, GetISeqPtr(iseqval, miseq); if (miseq->klass) { - iseqval = rb_iseq_clone(iseqval, 0); - RB_GC_GUARD(iseqval); + RB_GC_GUARD(iseqval) = rb_iseq_clone(iseqval, 0); GetISeqPtr(iseqval, miseq); } |