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

ruby-changes:54748

From: usa <ko1@a...>
Date: Thu, 31 Jan 2019 19:56:21 +0900 (JST)
Subject: [ruby-changes:54748] usa:r66965 (ruby_2_4): merge revision(s) 66242: [Backport #15387]

usa	2019-01-31 19:56:17 +0900 (Thu, 31 Jan 2019)

  New Revision: 66965

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

  Log:
    merge revision(s) 66242: [Backport #15387]
    
    io.c (io_write_nonblock): add RB_GC_GUARD, io_fflush may switch threads
    
    Since io_fflush may block on mutex or rb_io_wait_readable and
    switch threads, we need to ensure the `str' VALUE returned by
    `rb_obj_as_string` is visible to GC.

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/io.c
    branches/ruby_2_4/version.h
Index: ruby_2_4/io.c
===================================================================
--- ruby_2_4/io.c	(revision 66964)
+++ ruby_2_4/io.c	(revision 66965)
@@ -2712,6 +2712,7 @@ io_write_nonblock(VALUE io, VALUE str, V https://github.com/ruby/ruby/blob/trunk/ruby_2_4/io.c#L2712
 
     rb_io_set_nonblock(fptr);
     n = write(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
+    RB_GC_GUARD(str);
 
     if (n == -1) {
 	int e = errno;
Index: ruby_2_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 66964)
+++ ruby_2_4/version.h	(revision 66965)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #define RUBY_VERSION "2.4.6"
 #define RUBY_RELEASE_DATE "2019-01-31"
-#define RUBY_PATCHLEVEL 340
+#define RUBY_PATCHLEVEL 341
 
 #define RUBY_RELEASE_YEAR 2019
 #define RUBY_RELEASE_MONTH 1
Index: ruby_2_4
===================================================================
--- ruby_2_4	(revision 66964)
+++ ruby_2_4	(revision 66965)

Property changes on: ruby_2_4
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r66242

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

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