[issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot

Richard Oudkerk report at bugs.python.org
Wed Nov 13 11:08:28 CET 2013


Richard Oudkerk added the comment:

If you have a pending overlapped operation then the associated buffer should not be deallocated until that operation is complete, or else you are liable to get a crash or memory corruption.

Unfortunately WinXP provides no reliable way to cancel a pending operation -- there is CancelIo() but that just cancels operations started by the *current thread* on a handle.  Vista introduced CancelIoEx() which allows cancellation of a specific overlapped op.

These warnings happen in the deallocator because the buffer has to be freed.

For Vista and later versions of Windows these warnings are presumably unnecessary since CancelIoEx() is used.

For WinXP the simplest thing may be to check if Py_Finalize is non-null and if so suppress the warning (possibly "leaking" the buffer since we are exiting anyway).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19565>
_______________________________________


More information about the Python-bugs-list mailing list