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

ruby-changes:50312

From: naruse <ko1@a...>
Date: Fri, 16 Feb 2018 17:31:42 +0900 (JST)
Subject: [ruby-changes:50312] naruse:r62427 (ruby_2_5): merge revision(s) 61754: [Backport #14346]

naruse	2018-02-16 17:31:35 +0900 (Fri, 16 Feb 2018)

  New Revision: 62427

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

  Log:
    merge revision(s) 61754: [Backport #14346]
    
    dir.c: pass flags to openat(2) correctly
    
    Flags are 3rd argument of openat(2) while the 4th argument
    (mode_t) is unnecessary for our uses.  This bug exists since
    Ruby 2.5 from r58860 and was discoverd by strace.
    
    * dir.c (nogvl_opendir_at): use openat correctly
      [Feature #13056] [Feature #14346]

  Modified directories:
    branches/ruby_2_5/
  Modified files:
    branches/ruby_2_5/dir.c
    branches/ruby_2_5/version.h
Index: ruby_2_5/version.h
===================================================================
--- ruby_2_5/version.h	(revision 62426)
+++ ruby_2_5/version.h	(revision 62427)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/version.h#L1
 #define RUBY_VERSION "2.5.0"
 #define RUBY_RELEASE_DATE "2018-02-16"
-#define RUBY_PATCHLEVEL 17
+#define RUBY_PATCHLEVEL 18
 
 #define RUBY_RELEASE_YEAR 2018
 #define RUBY_RELEASE_MONTH 2
Index: ruby_2_5/dir.c
===================================================================
--- ruby_2_5/dir.c	(revision 62426)
+++ ruby_2_5/dir.c	(revision 62427)
@@ -1446,7 +1446,7 @@ nogvl_opendir_at(void *ptr) https://github.com/ruby/ruby/blob/trunk/ruby_2_5/dir.c#L1446
 			       O_DIRECTORY|
 #  endif /* O_DIRECTORY */
 			       0);
-    int fd = openat(oaa->basefd, oaa->path, 0, opendir_flags);
+    int fd = openat(oaa->basefd, oaa->path, opendir_flags);
 
     dirp = fd >= 0 ? fdopendir(fd) : 0;
     if (!dirp) {
@@ -1454,7 +1454,7 @@ nogvl_opendir_at(void *ptr) https://github.com/ruby/ruby/blob/trunk/ruby_2_5/dir.c#L1454
 
 	switch (gc_for_fd_with_gvl(e)) {
 	  default:
-	    if (fd < 0) fd = openat(oaa->basefd, oaa->path, 0, opendir_flags);
+	    if (fd < 0) fd = openat(oaa->basefd, oaa->path, opendir_flags);
 	    if (fd >= 0) dirp = fdopendir(fd);
 	    if (dirp) return dirp;
 
Index: ruby_2_5
===================================================================
--- ruby_2_5	(revision 62426)
+++ ruby_2_5	(revision 62427)

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

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

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