classification
Title: _overlapped: read_buffer and write_buffer are misused
Type: Stage:
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, larry, pitrou, sbt, vstinner
Priority: release blocker Keywords: patch

Created on 2014-01-30 15:22 by vstinner, last changed 2014-01-30 20:45 by vstinner. This issue is now closed.

Files
File name Uploaded Description Edit
overlapped.patch vstinner, 2014-01-30 15:22 review
Messages (2)
msg209721 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-01-30 15:22
I found an issue in overlapped.c: read_buffer and write_buffer attributes are defined in an union, but they are sometimes use even if the type is not good. I found this issue while trying to get a BrokenPipeError on Windows when the stdin stream of a subprocess is full but the process exited.

Could you please review attached patch, especially the change in Overlapped_getresult?

Another option would be to use two real attributes (remove the union), but I like the usage of union :-)

All Tulip unit tests of my subprocess_stream pass on Linux and Windows with the patch.
msg209737 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-01-30 20:45
Patch commited as 73dbb884eb09 in Python 3.4. (No need to backport, it's a new module in Python 3.4).

Thanks for the review Richard.
History
Date User Action Args
2014-01-30 20:45:43vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg209737
2014-01-30 15:22:29vstinnercreate