[Bug 34941] Ruby 1.9.x interpreter hangs with OS-level thread concurrency error (msvcrt internal semi-documented 'ioinfo' structure layout mismatch)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Oct 4 09:52:27 CDT 2014


https://bugs.winehq.org/show_bug.cgi?id=34941

s.wanabe at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |s.wanabe at gmail.com

--- Comment #8 from s.wanabe at gmail.com ---
I have tested ruby-2.0.0-p576-i386-mingw32 on latest wine 1.7.28.
It has not worked yet.

I guess msvcrt_set_fd() needs to initialize fdinfo->crit because win32.c (in
ruby) includes "EnterCriticalSection(&(_pioinfo(fd)->lock)".

I confirmed that "wine ruby.exe -e 'p 1'" worked fine with below patch.

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 7ce8b59..a7f3a5c 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -380,7 +380,8 @@ static int msvcrt_set_fd(HANDLE hand, int flag, int fd)
   fdinfo->lookahead[0] = '\n';
   fdinfo->lookahead[1] = '\n';
   fdinfo->lookahead[2] = '\n';
-  fdinfo->exflag = 0;
+  InitializeCriticalSection(&fdinfo->crit);
+  fdinfo->exflag = EF_CRIT_INIT;

   /* locate next free slot */
   if (fd == MSVCRT_fdstart && fd == MSVCRT_fdend)

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list