[前][次][番号順一覧][スレッド一覧]

ruby-changes:44003

From: usa <ko1@a...>
Date: Tue, 6 Sep 2016 10:21:59 +0900 (JST)
Subject: [ruby-changes:44003] usa:r56076 (trunk): * time.c (obj2subsecx): subsec might be GC'ed. try to get rid of SEGV on mswin

usa	2016-09-06 10:21:54 +0900 (Tue, 06 Sep 2016)

  New Revision: 56076

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56076

  Log:
    * time.c (obj2subsecx): subsec might be GC'ed.  try to get rid of SEGV on mswin
      CI.

  Modified files:
    trunk/time.c
Index: time.c
===================================================================
--- time.c	(revision 56075)
+++ time.c	(revision 56076)
@@ -2453,6 +2453,7 @@ obj2subsecx(VALUE obj, VALUE *subsecx) https://github.com/ruby/ruby/blob/trunk/time.c#L2453
     else {
         divmodv(num_exact(obj), INT2FIX(1), &obj, &subsec);
         *subsecx = w2v(rb_time_magnify(v2w(subsec)));
+	RB_GC_GUARD(subsec);
     }
     return obj2ubits(obj, 6); /* vtm->sec */
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]