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 loewis
Recipients Gilles.Louppe, belopolsky, eric.smith, loewis, pitrou, rybesh, vstinner
Date 2012-09-10.23:19:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347319162.83.0.572423904232.issue7358@psf.upfronthosting.co.za>
In-reply-to
Content
Antoine: if you look at

http://svn.python.org/view/python/branches/ssize_t/Modules/cStringIO.c?revision=41731&view=markup&pathrev=42382

you'll notice that IOobject and Iobject have pos and stringsize as int, whereas Oobject has it as Py_ssize_t. This must have been a bug; I think the structures were meant as compatible. If they all should have been defined in terms of int, the assert would make sense.

That said, what actually got merged included all the fields as Py_ssize_t, in which case the assert makes no sense. OTOH, it prevents the cast below (of (int)l) to produce bogus results, so it actually helped to detect the bugs :-)

What is now needed (from people running into the issue) is a patch that resolves all aspects of >2GB handling in these modules. I believe the issue is resolved in Python 3 (by both StringIO and BytesIO properly using Py_ssize_t throughout there), so unless somebody interested in this problem actually contributes a patch, the issue is unlikely to advance.
History
Date User Action Args
2012-09-10 23:19:22loewissetrecipients: + loewis, belopolsky, pitrou, vstinner, eric.smith, rybesh, Gilles.Louppe
2012-09-10 23:19:22loewissetmessageid: <1347319162.83.0.572423904232.issue7358@psf.upfronthosting.co.za>
2012-09-10 23:19:22loewislinkissue7358 messages
2012-09-10 23:19:22loewiscreate