[Bug 37115] New: Calling ReadFile from WINBASEAPI (WinBase.h) with zero read length causes hang
https://bugs.winehq.org/show_bug.cgi?id=37115 Bug ID: 37115 Summary: Calling ReadFile from WINBASEAPI (WinBase.h) with zero read length causes hang Product: Wine Version: unspecified Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: robw(a)sagatech.ca Our software connects to a serial device using USB-serial adapters. In the process of attempting to create a wrapper for use on OSx, I discovered a hang when I attempted to connect to the device under Wine that does not occur under Windows. I have tracked it down to the WINBASEAPI ReadFile. Under Windows, if a zero value is passed as the length to read, it handles and returns zero. Under Wine, it causes a "black box" (meaning I can't trace it) hang. I have worked around this in my code by including a return on zero value for the length, however believe it may be responsible for other serial issues I have seen in researching this problem. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Rob Willard <robw(a)sagatech.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robw(a)sagatech.ca -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Rob Willard <robw(a)sagatech.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ronp(a)sagatech.ca -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |hardware --- Comment #1 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- What version of Wine? http://wiki.winehq.org/Bugs -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 --- Comment #2 from Rob Willard <robw(a)sagatech.ca> --- (In reply to Ken Sharp from comment #1)
What version of Wine? http://wiki.winehq.org/Bugs
1.7.24 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Rob Willard <robw(a)sagatech.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.7.24 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 --- Comment #3 from Rob Willard <robw(a)sagatech.ca> --- (In reply to Rob Willard from comment #2)
(In reply to Ken Sharp from comment #1)
What version of Wine? http://wiki.winehq.org/Bugs
1.7.24
(I have updated the ticket) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24(a)gmail.com --- Comment #4 from Alex Henrie <alexhenrie24(a)gmail.com> --- Created attachment 53650 --> https://bugs.winehq.org/attachment.cgi?id=53650 Test program I can confirm this bug, and I'm attaching a test program that demonstrates the problem. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 --- Comment #5 from Alex Henrie <alexhenrie24(a)gmail.com> --- Created attachment 53669 --> https://bugs.winehq.org/attachment.cgi?id=53669 Proposed patch Here's the patch I sent to wine-patches for this issue. Alexandre's comment on it can be read at https://www.winehq.org/pipermail/wine-devel/2016-February/111714.html -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch, source Status|UNCONFIRMED |NEW CC| |dmitry(a)baikal.ru Component|-unknown |ntdll Ever confirmed|0 |1 --- Comment #6 from Alex Henrie <alexhenrie24(a)gmail.com> --- Changing status from UNCONFIRMED to NEW. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |f35c1b2dc123a834d365e0ddb44 | |1370b22b97cbc Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Alex Henrie <alexhenrie24(a)gmail.com> --- Fixed by https://source.winehq.org/git/wine.git/commitdiff/f35c1b2dc123a834d365e0ddb4... For the record, I tested this patch with `socat PTY,link=$HOME/.wine/dosdevices/com1,raw,echo=0 PTY,link=$HOME/.wine/dosdevices/com2,raw,echo=0` and `./wine dlls/kernel32/tests/kernel32_test.exe.so comm` -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Michael Stefaniuc <mstefani(a)redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani(a)redhat.com Target Milestone|--- |1.8.x -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.9.5. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37115 Michael Stefaniuc <mstefani(a)redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |--- --- Comment #9 from Michael Stefaniuc <mstefani(a)redhat.com> --- Removing 1.8.x milestone from bugs included in 1.8.2. -- 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.
participants (1)
-
wine-bugs@winehq.org