[issue5623] test_fdopen fails with vs2005, release build on Windows 2000

Amaury Forgeot d'Arc report at bugs.python.org
Wed Apr 1 15:35:54 CEST 2009


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

I found a correction using the _msize() function, which returns the size
of a malloc'ed block. It is used to compute sizeof(ioinfo) at runtime.

The exact definition of the structure is no longer important; only the
first two fields are needed, which is a good thing IMO.
Now the code seems really independent from changes in the CRT.

Patch is attached.
The test (info->osfhnd == _get_osfhandle(fd)) is not really needed, I
left it outside an assert() because I wanted to test it on release builds.

Tested (only) with VS2005, sizeof_ioinfo is correctly computed when
presented to different versions of MSVCR80.dll.

----------
keywords: +patch
Added file: http://bugs.python.org/file13537/verify_fd.patch

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


More information about the Python-bugs-list mailing list