diff options
-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); } |