[Bug 17003] New: fseek with whence=SEEK_END after fread is ignored
http://bugs.winehq.org/show_bug.cgi?id=17003 Summary: fseek with whence=SEEK_END after fread is ignored Product: Wine Version: 1.1.13 Platform: Other OS/Version: other Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: msvcrt AssignedTo: wine-bugs(a)winehq.org ReportedBy: lkcl(a)lkcl.net Created an attachment (id=18793) --> (http://bugs.winehq.org/attachment.cgi?id=18793) test lseek SEEK_END being ignored after fread best expressed in python: filelen = 200 f = open("tst", "wb") for i in range(filelen): f.write(chr(i%256)) f.close() f = open("tst", "rb") f.seek(filelen-22) x = f.read(20) f.seek(-98, 2) print (filelen-98), f.tell() but c version is attached. from what i can best tell, the lseek(-9, SEEK_END) is just simply... being ignored! :) if you comment out the fread, the lseek is successful. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 Luke Kenneth Casson Leighton <lkcl(a)lkcl.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dank(a)kegel.com --- Comment #1 from Dan Kegel <dank(a)kegel.com> 2009-01-18 16:17:42 --- What's the real app that's busted -- is it a python test case? Mixing lseek and buffered I/O like that is officially undefined, fwiw. Does that test case of yours work on native? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 --- Comment #2 from Luke Kenneth Casson Leighton <lkcl(a)lkcl.net> 2009-01-19 04:38:16 --- hiya dan, yes it works on native. yes it's a python test case - a test of the zipfile module's 64-bit capabilities. so, what's actually broken is the entire 64-bit zipfile handling. which is... bad! :) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 --- Comment #3 from Dan Kegel <dank(a)kegel.com> 2009-01-19 10:59:15 --- Could we treat this as an upstream bug and have them call fseek instead of lseek? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 --- Comment #4 from Dan Kegel <dank(a)kegel.com> 2009-01-19 11:11:39 --- Or at least have a conversation with them about why they're mixing lseek and fread? BTW, your summary seems to be wrong, it says fseek, but your bug is about lseek?? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 Luke Kenneth Casson Leighton <lkcl(a)lkcl.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|fseek with whence=SEEK_END |lseek with whence=SEEK_END |after fread is ignored |after fread is ignored --- Comment #5 from Luke Kenneth Casson Leighton <lkcl(a)lkcl.net> 2009-01-19 12:21:53 ---
Could we treat this as an upstream bug and have them call fseek instead of lseek?
i know you're asking that honestly and sincerely, but my experience with the python developers lately (not so back in 2000) leads me to believe that the answer will be ( as this demonstrates: http://bugs.python.org/msg79917) "wine is a minority platform - therefore.... no way!". so, that kinda makes _me_ the "upstream" person, because i'm the one that's interested in seeing python running successfully under wine. ... and i'm not that enthusiastic about tracking down something that i will then have to maintain, esp. given that i know it works under native msvcrt! and esp as this is most definitely a... "one-off attention-span" thing, for me (next month i'll have something brighter and shinier to play with, i am sure...) :) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase --- Comment #6 from Austin English <austinenglish(a)gmail.com> 2009-07-21 13:34:31 --- Is this still an issue in current (1.1.26 or newer) wine? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |nerv(a)dawncrow.de Ever Confirmed|0 |1 --- Comment #7 from André H. <nerv(a)dawncrow.de> 2009-07-24 10:58:37 --- confirming in wine 1.1.26 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 --- Comment #8 from Austin English <austinenglish(a)gmail.com> 2010-09-07 14:03:40 CDT --- Created an attachment (id=30624) --> (http://bugs.winehq.org/attachment.cgi?id=30624) cross compiled exe With cygwin on xp. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download --- Comment #9 from Austin English <austinenglish(a)gmail.com> 2010-09-07 14:03:59 CDT --- For me on XP SP3, gives: buffer: read 19 fgetpos should be: 22 and is: 19 errno is: 0 looks like the lseek from SEEK_END simply... isn't happening -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 --- Comment #10 from André H. <nerv(a)dawncrow.de> 2012-06-19 15:03:12 CDT --- The problem is in MSVCRT_fgetpos line off = -file->_cnt; i could trace the line over 66725349 to 75315fa6 on the other hand it might not even be a problem as of: (In reply to comment #9)
For me on XP SP3, gives: buffer: read 19 fgetpos should be: 22 and is: 19 errno is: 0 looks like the lseek from SEEK_END simply... isn't happening
as Wine also prints: buffer: read 19 fgetpos should be: 22 and is: 19 errno is: 0 looks like the lseek from SEEK_END simply... isn't happening Maybe someone should add a testcase? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 Piotr Caban <piotr.caban(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban(a)gmail.com --- Comment #11 from Piotr Caban <piotr.caban(a)gmail.com> 2012-10-16 11:23:49 CDT --- The test is also failing on Windows 7. I've compiled the code myself forcing it to use both msvcrt.dll and msvcr90.dll. It didn't work in both cases. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 Piotr Caban <piotr.caban(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |UPSTREAM --- Comment #12 from Piotr Caban <piotr.caban(a)gmail.com> 2013-01-21 03:48:32 CST --- The c test attached to this bug is failing on all testbot machines: https://testbot.winehq.org/JobDetails.pl?Key=24039 The attached python code works correctly in Python26. Marking as fixed upstream. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17003 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Austin English <austinenglish(a)gmail.com> 2013-05-21 16:55:42 CDT --- (In reply to comment #12)
The c test attached to this bug is failing on all testbot machines: https://testbot.winehq.org/JobDetails.pl?Key=24039
The attached python code works correctly in Python26. Marking as fixed upstream.
Fixed UPSTREAM -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org