This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Alexander.Steppke
Recipients Alexander.Steppke, r.david.murray
Date 2011-10-14.09:13:46
SpamBayes Score 5.2474854e-07
Marked as misclassified No
Message-id <1318583627.87.0.573294170679.issue13171@psf.upfronthosting.co.za>
In-reply-to
Content
Hi David,

I followed your suggestion and tried to reproduce the problem without the tempfile module. It turns out that is indeed an underlying issue. I am not sure what the root cause is but now this is even a bigger problem: read() returns information from some file/memory that it was never intended to access. 

The session looks similar to the tempfile session:

>>> tmp = open('tmp', 'w+t')
>>> tmp.read()
''
>>> tmp.write('test')
>>> tmp.read()
'hp\'\x02\xe4\xb9>7\x80\x88\x81\x02\x01\x00\x00\x00\x00\x00\x00\x00\x12\x00\x00\
x00\xe86(\x02p\x11\x8d\x02\x01\x00\x00\x00@\xfd)\x02\xe7Y\x9aN\x01\x00\x00\x00\x
00\x00\x00\x00\x14\x00\x00\x00\x087(\x02\x00\x00\x00\x00\xe9Y\x0b\xa2\x00\x93+\x
02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9b,\x02\x02\x00\x00\x00\xe06(\x02\xc0W5\

At the moment the bug could only be reproduced using CPython 2.7.1 on Windows XP and Windows 7. 

Alexander
History
Date User Action Args
2011-10-14 09:13:47Alexander.Steppkesetrecipients: + Alexander.Steppke, r.david.murray
2011-10-14 09:13:47Alexander.Steppkesetmessageid: <1318583627.87.0.573294170679.issue13171@psf.upfronthosting.co.za>
2011-10-14 09:13:47Alexander.Steppkelinkissue13171 messages
2011-10-14 09:13:46Alexander.Steppkecreate