A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-September/155326.html below:

[Python-Dev] Bug in _portable_fseek on Windows in 2.7.x

[Python-Dev] Bug in _portable_fseek on Windows in 2.7.x [Python-Dev] Bug in _portable_fseek on Windows in 2.7.xMyria myriachan at gmail.com
Tue Sep 25 15:38:17 EDT 2018
Sorry for mailing about a bug instead of putting in a bug tracker
ticket.  The bug tracker's login system just sits there for a minute
then says "an error has occurred".


This line of code is broken in Windows:

https://github.com/python/cpython/blob/v2.7.15/Objects/fileobject.c#L721

_lseeki64 only modifies the kernel's seek position, not the cached
position stored in stdio.  This sometimes leads to problems where
fgetpos does not return the correct file pointer.

The solution is to not do that "SIZEOF_FPOS_T >= 8" code at all on
Windows, and just do this instead (or make a new HAVE_FSEEKI64 macro):

#elif defined(MS_WINDOWS)
   return _fseeki64(fp, offset, whence);


3.x is unaffected because it uses the Unix-like FD API in Windows
instead of stdio, in which its usage of _lseeki64 is correct.


Thanks,

Melissa
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4