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

ruby-changes:38368

From: normal <ko1@a...>
Date: Sat, 9 May 2015 07:31:29 +0900 (JST)
Subject: [ruby-changes:38368] normal:r50449 (trunk): ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard

normal	2015-05-09 07:31:02 +0900 (Sat, 09 May 2015)

  New Revision: 50449

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

  Log:
    ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard
    
    The control buffer may be used throughout the function, so
    prevent the string from being lost to GC.
    
    * ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard
      [Bug #11123]

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/ancdata.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50448)
+++ ChangeLog	(revision 50449)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat May  9 06:48:36 2015  Eric Wong  <e@8...>
+
+	* ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard
+	  [Bug #11123]
+
 Fri May  8 22:57:24 2015  takiy33  <takiy33@g...>
 
 	* test/matrix/test_matrix.rb (test_determinant): refactor test on
Index: ext/socket/ancdata.c
===================================================================
--- ext/socket/ancdata.c	(revision 50448)
+++ ext/socket/ancdata.c	(revision 50449)
@@ -1711,6 +1711,7 @@ bsock_recvmsg_internal(int argc, VALUE * https://github.com/ruby/ruby/blob/trunk/ext/socket/ancdata.c#L1711
                 discard_cmsg(cmh, msg_end, (flags & MSG_PEEK) != 0);
             rb_ary_push(ret, ctl);
         }
+        RB_GC_GUARD(ctl_str);
     }
 #endif
 

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

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