ruby-changes:48654
From: usa <ko1@a...>
Date: Wed, 15 Nov 2017 12:45:04 +0900 (JST)
Subject: [ruby-changes:48654] usa:r60770 (trunk): nogvl readdir make SEGV on Windows
usa 2017-11-15 12:44:58 +0900 (Wed, 15 Nov 2017) New Revision: 60770 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60770 Log: nogvl readdir make SEGV on Windows * dir.c (readdir_without_gvl): workaround for Windows. [Bug #14108] Modified files: trunk/dir.c Index: dir.c =================================================================== --- dir.c (revision 60769) +++ dir.c (revision 60770) @@ -743,6 +743,7 @@ to_be_skipped(const struct dirent *dp) https://github.com/ruby/ruby/blob/trunk/dir.c#L743 return FALSE; } +#ifndef _WIN32 static void * nogvl_readdir(void *ptr) { @@ -756,6 +757,9 @@ readdir_without_gvl(struct dir_data *dir https://github.com/ruby/ruby/blob/trunk/dir.c#L757 { return rb_thread_call_without_gvl(nogvl_readdir, dirp, RUBY_UBF_IO, 0); } +#else +#define readdir_without_gvl(dirp) READDIR((dirp)->dir, (dirp)->enc) +#endif /* * call-seq: -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/