[issue5544] test_fileio fials on windows MSVC Assertion
Hirokazu Yamamoto
report at bugs.python.org
Mon Mar 23 19:39:44 CET 2009
Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp> added the comment:
I cannot test this because I don't have recent VC, but last week change
to _fileio.c is this.
http://svn.python.org/view/python/branches/py3k/Modules/_fileio.c?r1=70187&r2=70352
On windows, lseek was used before, but _lseeki64 in portable_lseek is
used now. Maybe does following patch work?
Index: Modules/_fileio.c
===================================================================
--- Modules/_fileio.c (revision 70537)
+++ Modules/_fileio.c (working copy)
@@ -682,6 +682,9 @@
return NULL;
}
+ if (!_PyVerify_fd(fd))
+ return NULL;
+
Py_BEGIN_ALLOW_THREADS
#if defined(MS_WIN64) || defined(MS_WINDOWS)
res = _lseeki64(fd, pos, whence);
----------
nosy: +ocean-city
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5544>
_______________________________________
More information about the Python-bugs-list
mailing list