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 vstinner
Recipients brett.cannon, christian.heimes, gregory.p.smith, serhiy.storchaka, vstinner
Date 2013-12-08.11:10:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386501028.03.0.46604243691.issue19883@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a work-in-progress patch.

PyMarshal_ReadShortFromFile() and PyMarshal_ReadLongFromFile() are still wrong: new Unsigned version should be added to marshal.c. I don't know if a C cast to unsigned is enough because long can be larger than 32-bit (ex: on Linux 64-bit):
#if SIZEOF_LONG > 4
        /* Sign extension for 64-bit machines */
        x |= -(x & 0x80000000L);
#endif

I didn't test my patch. Anyone interested to finish the patch?
History
Date User Action Args
2013-12-08 11:10:28vstinnersetrecipients: + vstinner, brett.cannon, gregory.p.smith, christian.heimes, serhiy.storchaka
2013-12-08 11:10:28vstinnersetmessageid: <1386501028.03.0.46604243691.issue19883@psf.upfronthosting.co.za>
2013-12-08 11:10:28vstinnerlinkissue19883 messages
2013-12-08 11:10:27vstinnercreate