[python-win32] Ref-count bug in win32file.GetQueuedCompletionStatus
Fred Gansevles
gansevle at cs.utwente.nl
Thu Jun 2 10:32:34 CEST 2005
> > Hi,
> > I think I've found a ref-count bug in
> win32file.GetQueuedCompletionStatus
>
> You have indeed! GetQueuedCompletionStatus used to assume that the
> OVERLAPPED object was previously added to the IOCP via
> PortQueuedCompletionStatus. I've now fixed that bug and checked the changes
> into CVS.
>
Thanks.
> Thanks very much for the effective repro case - it allowed me to see your
> issue quickly and I even borrowed that code for the test suite.
Feel free to use it!
>
> Let me know if you would like a new version of the affected DLLs (and what
> Python version you use).
I'm not in a hurry right now, since I made a work-around with ctypes
def GetQueuedCompletionStatus(port, timeout):
from ctypes import windll, c_long, c_void_p, byref
n = c_long()
k = c_long()
o = c_void_p()
r = windll.kernel32.GetQueuedCompletionStatus(
int(port), byref(n), byref(k),
byref(o), timeout)
return r, n.value, k.value, o.value
and this does the job perfectely.
b.t.w. the bug 'worked' in both python-2.3.5 and python-2.4.1
>
> Cheers,
>
> Mark
____________________________________________________________________________
Fred Gansevles <mailto:Fred.Gansevles at ewi.utwente.nl> Phone: +31 53 489 4613
Org.: Twente University, Fac. of EWI, Box 217, 7500 AE Enschede, Netherlands
"Linux is like a wigwam, No windows, no gates and an apache inside"
More information about the Python-win32
mailing list